hibernate two tables per one entity

后端 未结 5 1994
栀梦
栀梦 2020-12-01 05:31

I have one entity - User. It is described by User.class.

Hibernate creates one table per entity, so when I call session.save(user)

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 06:09

    Also it works using a default entity and an alternative one:

    
         
             
                 
             
            
     
     
             
                
             
            
    
    
    

    For the default one, you can use the method

    _session.Save(user1)
    

    and

    _session.Save("User2Object", user2)
    

    for the alternative one.

提交回复
热议问题