Georg Echterling (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmU4MmUzZTgw...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16688?atlOrigin=eyJpIjoiYmU4Mm...
) HHH-16688 (
https://hibernate.atlassian.net/browse/HHH-16688?atlOrigin=eyJpIjoiYmU4Mm...
) Some dirty attributes will not be updated for entities with superclasses (
https://hibernate.atlassian.net/browse/HHH-16688?atlOrigin=eyJpIjoiYmU4Mm...
)
Issue Type: Bug Affects Versions: 6.1.7 Assignee: Unassigned Created: 24/May/2023 10:08 AM
Priority: Critical Reporter: Georg Echterling (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
AbstractEntityPersister#resolveDirtyAttributeIndexes checks the arrays of dirty attributes
against the entity’s attribute mappings. (Line 2607 in version 6.1.7) As an optimization,
it assumes that both arrays are alphabetically sorted to reduce the algorithmoic
complexity to O. However, for entities with superclasses, the attribute mappings aren’t
sorted alphabatically. The superclass attributes are always listed first. This causes some
dirty attribute names to never be checked against their appropriate attribute mapping.
In our case, this causes some changed fields to be silently skipped on updates, leading to
data corruption and unexpected/undefined behaviour in our application logic.
(
https://hibernate.atlassian.net/browse/HHH-16688#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16688#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:2b972a1 )