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

552 views Asked by At

Given I have Entity A which has a Many-To-One relation to Entity B. Entity B has 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

There are 0 answers