[CB 4.0][cborm 1.0.3] BaseORMService causes error with save() in Lucee

Hi all,

I had some code I was testing in Lucee and came across this issue when calling the save() method that is available in the BaseORMService class.

The error I’m receiving is: “Flush during cascade is dangerous” and thus not allowing me to save.

The error is coming from line 793 of the BaseORMService.cfc

if( arguments.transactional ){
return $transactioned(variables.$save, arguments);

I’ve tried updating Lucee to versions and and no luck there either. I know this is more of a Lucee issue and using transactions than it is a ColdBox issue, but wanted to make everyone aware of this in case anyone was planning to switch over to Lucee and is using the cborm module.

I will also say, even using entitySave() wrapped in a transaction causes issues as well in Lucee and I believe there are some tickets in the Lucee bug tracker surrounding this, so as I said it’s not really an issue with CB but if anyone has a work around for the time being I would be all ears.


Ben can you point me to the tickets about this so I can try to help with the lucee team.

Luis Majano
Ortus Solutions, Corp
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Hi Luis,

Here is one of the tickets that one of my coworkers found when he first found this bug. Actually it looks to be the only one. I thought there were more.

But it looks like it was introduced in Railo and carried over to Lucee.


That would be great if it can be resolved rather quickly.


Hi Luis,

I work with Ben and found similar problems in several cases while using transaction{} to either save or delete an entity instance (sans coldbox). Here are a couple of screencapture examples of the ORM transaction bug that may help the lucee team:



I’ll post in their group as well.


Hi again,

Just wanted to link this with the following Lucee discussion:



Same error here. Is this solved?