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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -