how to map a one-to-many collection to a joined subclass when key is in the parent class

Deadly 提交于 2019-12-06 09:31:41

If I understand your question correctly then I don't think that is possible. If the class Bar has a reference to Foo then the FK that is generated with the current config is correct. If you want Bar to have a reference to AbstractFoo then it will create the FK to the abstractFoo table and allow any subclass of AbstractFoo to be references bay Bar.

Usually this is actually what you want...A reference to the super class. However, without knowing moree about your design, if you reallly jst need a reference to the subclass then your configuration is correct.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!