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
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed when working on the
@TimeZoneStoragestuff that even though theOffsetDateTimeCompositeUserTypeandZonedDateTimeCompositeUserTypeare 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
TimeZoneStorageannotation passed to the constructor ofTimeZoneStorageCompositeUserType. (Actually that would not be quite enough here,TimeZoneStorageCompositeUserTypewould 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
@CompositeTypeRegistrationannotation, but we don't appear to have a matching annotation for registering plainUserTypes. At least I could not find one, did I miss it somehow?Beta Was this translation helpful? Give feedback.
All reactions