How do I join tables on non-primary key columns in secondary tables?

后端 未结 3 1630
攒了一身酷
攒了一身酷 2021-01-11 15:09

I have a situation where I need to join tables on an object in an ORM class hierarchy where the join column is NOT the primary key of the base class. Here is an example of

3条回答
  •  一向
    一向 (楼主)
    2021-01-11 15:31

    Not sure how to do this with JPA/Annotations, but with Hibernate XML mapping files it would be something like:

    
        
            
            
        
        
            
             
            
            
        
    
    

提交回复
热议问题