gavinbaumanis
09/28/2023, 3:16 AMflushAtRequestEnd
at play...)
this.ormSettings = {
datasource = "GSN",
dialect = "MySQL",
dbCreate = "none",
cfcLocation = "/gsncfc/db",
automanageSession = false,
flushAtRequestEnd = false,
useDBForMapping = false,
eventHandling = true,
eventHandler = "gsncfc.db.GlobalEventHandler",
logSQL = false
};
mborn
09/28/2023, 12:24 PMAn exception is thrown where ever I use a transaction / transactionCommit().What exception would that be? aka, the full stacktrace?
mborn
09/28/2023, 12:26 PMflushAtRequestEnd=false
, the only way to commit changes is to close a transaction block or run ormFlush()
. Hence, I am curious - do you also get this error if you comment out the transaction{
block and run ormFlush()
?gavinbaumanis
10/01/2023, 1:09 PMpublic void function endAllSessions(required numeric userId) output="false" {
//transaction action="begin" {
try {
// Retreive any sessions for the user that are current
var currentSessions = ORMExecuteQuery("
SELECT s
FROM session s
INNER JOIN s.profile p
WHERE p.user.id = :uid
AND s.sessionEnd >= :datetimenow
AND s.impersonatingProfile IS NULL",
{
uid=arguments.userId,
datetimenow=createODBCDatetime(now())
}
);
for(var j=1; j LTE arrayLen(currentSessions); j++) {
// End session now
currentSessions[j].setSessionEnd( now() );
entitySave(currentSessions[j]);
};
//transactionCommit();
ormFLush();
} catch(any e) {
// TODO : LOG
// transactionRollback();
rethrow;
}
//}
}
gavinbaumanis
10/01/2023, 1:30 PMjclausen
10/01/2023, 1:32 PMgavinbaumanis
10/01/2023, 1:34 PMjclausen
10/01/2023, 1:41 PMgavinbaumanis
10/01/2023, 1:44 PMmborn
10/01/2023, 1:44 PMgavinbaumanis
10/01/2023, 1:52 PMjclausen
10/01/2023, 2:06 PMgavinbaumanis
10/01/2023, 2:18 PMjclausen
10/01/2023, 2:19 PMjclausen
10/01/2023, 2:22 PMgavinbaumanis
10/01/2023, 2:32 PMjclausen
10/01/2023, 2:34 PMgavinbaumanis
10/01/2023, 2:41 PMjclausen
10/01/2023, 2:44 PMgavinbaumanis
10/01/2023, 2:46 PMgavinbaumanis
10/01/2023, 10:34 PMmborn
10/02/2023, 1:46 AMmborn
10/02/2023, 1:46 AMmborn
10/02/2023, 1:46 AMmborn
10/02/2023, 1:48 AMsession
reserved word.mborn
10/02/2023, 1:50 AMgavinbaumanis
10/02/2023, 2:04 AMgavinbaumanis
10/02/2023, 2:06 AMmborn
10/02/2023, 2:09 AMmborn
10/02/2023, 2:09 AMmborn
10/02/2023, 2:09 AMmborn
10/02/2023, 2:10 AMgavinbaumanis
10/02/2023, 2:14 AMtable="`session`"
gavinbaumanis
10/02/2023, 2:17 AMgavinbaumanis
10/02/2023, 2:20 AMtable="\"session"\"
mborn
10/02/2023, 2:20 AMmborn
10/02/2023, 2:20 AMmborn
10/02/2023, 2:20 AMmborn
10/02/2023, 2:21 AMmborn
10/02/2023, 2:22 AMhibernate.globally_quoted_identifiers=true
but I don't know if we have the ability to set ad-hoc Hibernate config properties in CFML.gavinbaumanis
10/02/2023, 2:22 AMgavinbaumanis
10/02/2023, 2:25 AMgavinbaumanis
10/02/2023, 2:25 AMtable="\"session"\"
was the answer!mborn
10/02/2023, 2:26 AMgavinbaumanis
10/02/2023, 2:26 AMmborn
10/02/2023, 2:26 AMmborn
10/02/2023, 2:26 AMgavinbaumanis
10/02/2023, 2:27 AMgavinbaumanis
10/02/2023, 2:27 AMmborn
10/02/2023, 2:28 AMmborn
10/02/2023, 2:28 AMgavinbaumanis
10/02/2023, 2:29 AMgavinbaumanis
10/02/2023, 2:36 AMgavinbaumanis
10/02/2023, 2:43 AMgavinbaumanis
10/02/2023, 2:44 AMgavinbaumanis
10/02/2023, 2:48 AMmborn
10/02/2023, 2:49 AMgavinbaumanis
10/02/2023, 2:49 AMgavinbaumanis
10/02/2023, 3:09 AMgavinbaumanis
10/02/2023, 3:09 AMgavinbaumanis
10/02/2023, 4:16 AMmborn
10/02/2023, 4:26 AMmborn
10/02/2023, 4:27 AMmborn
10/02/2023, 4:27 AMmborn
10/02/2023, 4:33 AMbox server log --follow
to see what's going on when you run that page/query.