Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzM2NWJmN2Qw...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16127?atlOrigin=eyJpIjoiMzM2NW...
) HHH-16127 (
https://hibernate.atlassian.net/browse/HHH-16127?atlOrigin=eyJpIjoiMzM2NW...
) Support for `@Immutable` on AttributeConverter implementations (
https://hibernate.atlassian.net/browse/HHH-16127?atlOrigin=eyJpIjoiMzM2NW...
)
Issue Type: Improvement Assignee: Unassigned Created: 01/Feb/2023 13:27 PM Priority: Major
Reporter: Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Here, we are talking about the internal state of a value. So, e.g. a String is immutable
(we cannot change its internal state) while a Date is mutable (its internal state can be
changed). Effectively this tells Hibernate a few important pieces of detail -
* Can we use == for dirty detection, or must we use #equals ?
* How do we make copies of those values.
* etc
When an AttributeConverter is in the mix, there is also a big performance impact.
Basically anytime we need to make a copy, which happens quite a bit internally, we need to
use the converter.
So ideally we want to allow users to indicate that a converted attribute should be treated
as immutable. Now we already have this capability using @Immutable on the attribute
itself. But for repeated conversions (especially auto-applied conversions), that gets
tedious.
Allow @Immutable to be specified on the converter itself.
(
https://hibernate.atlassian.net/browse/HHH-16127#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16127#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#100214- sha1:06410ea )