Answer the question
In order to leave comments, you need to log in
How to map a Map< String, ArrayList> object in hibernate?
There is Map<String, ArrayList<String>> data;
an object which is inside @Entity .
It is required to map only ArrayList<String>
in the database, i.e. only data.entrySet()
.
As a result, you need to get a table consisting only of ArrayList.
Is it possible to do this without creating an additional variable?
How to do it with annotations?
Answer the question
In order to leave comments, you need to log in
No way. Marshaling is always symmetrical. If it were possible to discard the mapping keys when saving the entity to the database, then where would they come from when restoring the entity from the database?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question