ORM is re-creating all many-to-many relationships on entity save

65 views
Skip to first unread message

Sergii Galashyn

unread,
Nov 19, 2016, 8:43:56 AM11/19/16
to Lucee
Hi,

Here's a problem which appears after switching to Lucee 5. Staging server with Lucee 4.5 isn't affected.


I have a few entity relationships defined like this:

property name="categories"
    fieldtype
="many-to-many"
    cfc
="Category"
    linktable
="questions_categories"
    fkcolumn
="questionid"
    inversejoincolumn
="categoryid"
    singularname
="category"
    type
="array"
    lazy
="true";


This relationship is being re-created each time parent entity is saved -- I can see a bunch of deletes followed by inserts into the FusionReactor transactions history.


ORM is configured like this:


this.ormsettings = {
    cfclocation
= "models",
    dialect
= "MySQLwithInnoDB",
    flushAtRequestEnd
= false,
    dbcreate
= "none",
    useDBForMapping
= false,
    autoManageSession
= false
};

But again, this configuration works just fine on 4.5 literally for years.

ORM and datasource configuration in both discussed Lucee versions are exactly the same.

I'm running Lucee 5.1.0.34 with Hibernate 3.5.5.61.

I've tried to upgrade to 5.1.1.16-SNAPSHOT, but result is the same. I've tried to upgrade to Hibernate 4 extension, but it's not compatible and simply breaks.

What can I do to research this further? Any ideas what could be causing this behavior?

Thank you!
-Sergii

Patrick Flynn

unread,
Nov 21, 2016, 3:27:55 PM11/21/16
to Lucee
This appears to be an issue with that build of hibernate. I have a similar issue in Slatwall running on Lucee 5. Here is my post over in the Slatwall Group below. My workaround for the time being was to downgrade Hibernate to 3.5.5.59.

https://groups.google.com/forum/#!topic/slatwallecommerce/4xnuJprirBA

Sergii Galashyn

unread,
Nov 22, 2016, 6:17:52 AM11/22/16
to lu...@googlegroups.com

Hi Patrick, downgrade worked for me as well. Thank you!

--
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/bwvZYjqFv1M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/39b9c929-add4-4227-afcf-927fe429b6e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages