Skip to main content
Participant
December 31, 2018
Question

ORM issue after upgrading to CF2018 from CF2011

  • December 31, 2018
  • 1 reply
  • 311 views

Hi,

We migrated from CF2011 to CF2018 and then ORM is breaking the EntitySave method and we are getting below error message.

Error Message - The root cause of this exception was: coldfusion.orm.hibernate.HibernateSessionException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1.

We have 2 classes with one-to-many relationship like Email.cfc(parent) and EmailItems.cfc(child). When we try to save Email.cfc object the hybernate crates a UPDATE query for EmailItems as well and this is happening with CF2018 only.

Here is the defined property in Email.cfc.

<cfproperty name="EmailItems" lazy="true" fieldtype="one-to-many" inverse="true" fkcolumn="EmailID" cfc="EmailItem" singularName="EmailItem" type="struct" structkeycolumn="EmailItemKey" structkeytype="string" cascade="none"/>

We are using inverse and it still create a UPDATE query for child class 'EmailItems' which is the reason for failing EntitySave(Email).Everything works fine with CF2011.

Thanks,

Manjeet

This topic has been closed for replies.

1 reply

Participant
January 1, 2019

In short, Inverse="true" doesn't seem working with ColdFusion 2018.

Please help me with this. We are stuck in the middle of migration of ColdFusion 2018.