Won't Fix
Details
Assignee
Michael OffnerMichael OffnerReporter
Sumit VermaSumit Verma(Deactivated)Priority
NewNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Sumit Verma
Sumit Verma(Deactivated)Priority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 14 March 2022 at 18:01
Updated 8 June 2023 at 18:13
Resolved 8 June 2023 at 18:13
Setting a default value for primary key throws an error in 5.4. It used to work fine in 3.5. We set default value to avoid dealing with null when checking if the object is new.
Error thrown is:
ucee.runtime.exp.NativeException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [ENTITYNAME#] at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:223) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:93) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1366) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1349) at org.lucee.extension.orm.hibernate.HibernateORMSession._flush(HibernateORMSession.java:225) at org.lucee.extension.orm.hibernate.HibernateORMSession.flush(HibernateORMSession.java:218) at org.lucee.extension.orm.hibernate.HibernateORMSession.flush(HibernateORMSession.java:213) at lucee.runtime.functions.orm.ORMFlush.call(ORMFlush.java:32) at lucee.runtime.functions.orm.ORMFlush.call(ORMFlush.java:28)