Support mapping composite/struct types #5104
Replies: 2 comments 3 replies
-
Looks good, but to me it feels like the main "usefulness" of structs is to be able to use them in |
Beta Was this translation helpful? Give feedback.
2 replies
-
When I look at our code base today, this is starting to feel like a missing feature. We should do it. I think it’s a lot more natural than SQL arrays, which we do have. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Allow mapping an embeddable as composite/struct type. My suggestion is to require 1-2 steps to opt into this kind of mapping.
@JdbcTypeCode( Types.STRUCT )
to the embedded attribute@Column(columnDefinition = "...")
- we derive a SQL type name from the simple embeddable class nameFor an initial implementation, this should be enough, but I have some ideas what we could do to improve usability further
@Struct(name = "...")
which can be annotated on the embeddable type. All type usages will use the composite/struct type by defaultMy intention is to add this to the next feature release 6.2 as part of https://hibernate.atlassian.net/browse/HHH-15327.
Beta Was this translation helpful? Give feedback.
All reactions