Strange problem when using Transaction with ormenablle true

Description

I have a simple cfc file (test.cfc) like this:

component
persistent="true"
output="false"
{

property name="thename" type="string"

}

after that in my cfm file I do call like this:

myTest = new test();
wequery = new Query();
sql = "INSERT INTO TData
(data)
VALUES
('Hello')";

wequery.setSQL(sql);

transaction{
myTest.setthename('name');
wequery.execute();
}

this will return error:
"this feature is not supported<br>The error occurred on line 110 in file /org/lucee/cfml/Base.cfc."
If I remove the transaction, then this is working fine.

Or If the code like this:

transaction{
wequery.execute();
}

this is work fine too.

FYI, if I set this.ormEnabled = false, then no error. So it seems lucee still have bug ith ORM things ?

Environment

Strange problem when using Transaction. Currently I use lucee 5.2.4.37 with MSSQL as database. My application has setting this.ormEnabled = true

Activity

Show:
Samuel W. Knowlton
February 17, 2020, 7:11 PM

We had to add ORMFlush() to the end of many transactions involving HQL and SQL. It was frustrating, since the whole point of using transactions (with flushAtRequestEnd = false) is to handle the Hibernate session for you.

Our ‘solution’ to this ticket was to move away from CFORM in favor of Quick and QB. It’s a multi-year process but ultimately Lucee has ceded the field on Hibernate support to Adobe. One could make the case that this is for good reason, but it’s become one of those things that “everybody knows” that if your app is ORM-heavy, switching to Lucee will be far more difficult than if you weren’t using Hibernate.

Adam Tuttle
September 22, 2020, 9:26 PM

It sure would be nice if someone from LAS would even acknowledge this bug.

Samuel W. Knowlton
6 days ago

There have been a few updates to the Hibernate extension, but the current snapshot doesn’t seem to work as well as the .75 release version. Any chance this is getting some attention?

Zac Spitzer
6 days ago

A major update to hibernate hibernate-5.4.27 is being actively developed https://github.com/lucee/extension-hibernate/commit/8cc66604929bf2905a597db2f95fc56f8e55d66d

Samuel W. Knowlton
5 days ago

That’s great news, thank you!

Assignee

Michael Offner

Reporter

Andri Senjaya

Priority

Major

Labels

Fix versions

None

Affects versions