开发者

JPA: Can I define a discriminatorColumn on a entity property that is not in the same entity?

开发者 https://www.devze.com 2023-02-10 08:21 出处:网络
Given I have Entity A which has a Many-To-One relation to Entity B. Entity B ha开发者_Go百科s a property (kind of enum) that I would like to use as Discriminator of certain subclasses of Entity A. Can

Given I have Entity A which has a Many-To-One relation to Entity B. Entity B ha开发者_Go百科s a property (kind of enum) that I would like to use as Discriminator of certain subclasses of Entity A. Can I define that with common JPA and/or Hibernate annotations Or do I need to create discribminated versions of Entity B to create this relation?

Cheers, Kai

0

精彩评论

暂无评论...
验证码 换一张
取 消