Is it possible to have foreign key enforced without object-to-object mapping?

前端 未结 4 756
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 07:15

Assuming the following mappings are provided:


  
  

        
4条回答
  •  忘掉有多难
    2021-01-18 07:56

    You could always create the Foreign Key DDL manually in your hibernate hbm.xml file:

    
        ...
        
            [CREATE FK]
            [DROP FK]
         
    
    

    You can also scope this if different dialects need to be supported.

    Check out 5.7. Auxiliary database objects

提交回复
热议问题