java - How to save multiple tables in hibernate -


i have 3 tables example:table_a, table_b , table_c. parent b , c. how can save tables @ time of parent table in hibernate.

if have mapped tables entities, :

example:

//parent  @entity @inheritance(strategy = inheritancetype.joined) public abstract class car { }  @entity public class bcar extends car {}  @entity public class ccar extends car {}  session.save(bcar); session.save(ccar); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -