apply a UserType or CompositeUserType via a custom annotation #5716
gavinking
started this conversation in
Design Proposals
Replies: 2 comments 1 reply
-
I added one today. |
Beta Was this translation helpful? Give feedback.
0 replies
-
See https://hibernate.atlassian.net/browse/HHH-15926. Most of this was actually already there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed when working on the
@TimeZoneStorage
stuff that even though theOffsetDateTimeCompositeUserType
andZonedDateTimeCompositeUserType
are just bog-standard user types, the had to be hardwired directly into the binding logic in a not-very-elegant way, because we have no way to say stuff like:and then have the
TimeZoneStorage
annotation passed to the constructor ofTimeZoneStorageCompositeUserType
. (Actually that would not be quite enough here,TimeZoneStorageCompositeUserType
would need a way to inspect other annotations of the property.I think this is an excellent use case to drive the design of such a facility, since it's both (a) of practical use and (b) quite nontrivial.
This is of course, all well in-line with how we're handling generators and some other things in 6.
By the way, I see that we have a
@CompositeTypeRegistration
annotation, but we don't appear to have a matching annotation for registering plainUserType
s. At least I could not find one, did I miss it somehow?Beta Was this translation helpful? Give feedback.
All reactions