CT (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6331d0c...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTgyNWIxMzE5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15554?atlOrigin=eyJpIjoiNTgyNW...
) HHH-15554 (
https://hibernate.atlassian.net/browse/HHH-15554?atlOrigin=eyJpIjoiNTgyNW...
) Regression 5.6.11 immutable composite user types (
https://hibernate.atlassian.net/browse/HHH-15554?atlOrigin=eyJpIjoiNTgyNW...
)
Issue Type: Bug Affects Versions: 5.6.11 Assignee: Unassigned Components: hibernate-core
Created: 26/Sep/2022 09:38 AM Environment: 5.6.11, JDK11, Linux/Windows Priority: Critical
Reporter: CT (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6331d0c...
)
Regression on 5.6.11 when using a column referencing a composite user type which is
immutable.
Caused by changes to HHH-15359 (
https://hibernate.atlassian.net/browse/HHH-15359 ) Closed
in particular
https://github.com/hibernate/hibernate-orm/commit/fd3ab8b7cfb21f7fd14e628...
(
https://github.com/hibernate/hibernate-orm/commit/fd3ab8b7cfb21f7fd14e628...
) fails to work with a custom/composite user type which is immutable (ref.
CompositeUserType#isMutable) and therefore doesn't support
CompositeUserType#setPropertyValue.
Might be necessary to adapt the check in TypeHelper#replaceAssociations to assure the type
is mutable before trying to manipulate it:
*TypeHelper.java*
if ( componentType.isMutable() && target[i] != null && objects != null
) {
// Need to account for entity mode on the CompositeType interface , that seems not
been used by any implementation
componentType.setPropertyValues( target[i], objects, EntityMode.POJO );
}
(
https://hibernate.atlassian.net/browse/HHH-15554#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15554#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#100207- sha1:1c92a42 )