Details
Assignee
UnassignedUnassignedReporter
Former userFormer user(Deactivated)Components
Fix versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Former user
Former user(Deactivated)Components
Fix versions
Priority
Created September 11, 2018 at 11:40 PM
Updated December 17, 2018 at 11:58 AM
When a bytecode-enhanced entity is cloned, both the original and clone have references to the same enhanced fields. This can result in unexpected behavior.
For example, Hibernate will use the same
EntityEntry
for both the original and clone because the enhanced getter$$_hibernate_getEntityEntry()
for both entities will return the sameEntityEntry
object.If the application attempts to delete the original entity, and set a different ID in the clone to persist, Hibernate will attempt to "resurrect" the deleted entity, but will throw an exception because there is no "delete" action scheduled for the clone.