Annotation to join all columns into a map #7315
Closed
lorenzbaier
started this conversation in
Design Proposals
Replies: 1 comment 5 replies
-
This is not really possible with SQL, because Hibernate ORM needs to know the names and types of the columns. What you can do easily though, is to use a JSON or XML type. @JdbcTypeCode(SqlTypes.JSON)
Map<String, Object> properties; which will use JSONB or Jackson for serialization, whichever is on your classpath. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An annotation which joins all columns of the given table and loads them into the map eagerly by using an sql join.
The columns of the joined table might change during runtime.
@JoinAllColumns(table = "book_properties") Map<String, Object> properties;
Beta Was this translation helpful? Give feedback.
All reactions