jpa - Storing some class fields in more than one table simultaneously using hibernate -
how should design classes store fields of class in more 1 table.
class child { private int id; private string name; private int age; private string favgame; }
i want create 2 tables-
table 1 : containing id, name, age , favgame
table 2 : name , age
also want referential integrity between these 2 tables, whenever record created/updated/deleted in table1, table2 should updated.
i have seen @secondarytable concept in following link
https://www.youtube.com/watch?v=f3bct8tkfcs
but not provide option store field in 2 tables simultaneously.
please suggest. in advance.
Comments
Post a Comment