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 4.5.1.003 and 4.5.1.008 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.
Thanks,
Ben
Ben can you point me to the tickets about this so I can try to help with the lucee team.
Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
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.
https://bitbucket.org/lucee/lucee/issue/77/orm-doesnt-persist-data-in-cftransactions
That would be great if it can be resolved rather quickly.
Thanks,
Ben
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:
http://screencast.com/t/wJNUvuNi9r
http://screencast.com/t/y3dd9sNbsHS
I’ll post in their group as well.
cheers,
Sutton
Same error here. Is this solved?
Thanks!