• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ORM issue after upgrading to CF2018 from CF2011

New Here ,
Dec 31, 2018 Dec 31, 2018

Copy link to clipboard

Copied

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

Views

272

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 01, 2019 Jan 01, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation