Hi,
I wonder, whether it is possible to map (writable and readable) many datasets (lines of a table in database) to one java-Object.
Database table:
Table_name (column_id, column_nr)
Datasets in table: (id_a, 1); (id_a, 2); (id_a, 3); (id_b, 4)
mapping java-Objects:
Object1:
ID: id_a ; setOfNr: {1,2,3}
Object2:
ID: id_b ; setOfNr: {4}
Is there any way for a mapping like this without any additional table in hibernate annotations?
I have a solution with one additional table and embed. This table has to store distinct ids (id_a,id_b).
Best regards
gimlitz
|