title: JPA multiple discriminator values
body: <p>We're setting up a new project and decided to use eclipselink for JPA. When creating our domain model we ran into a problem. </p>
  
  <p>We have a base class called organisation. We also have Supplier and Customer which both extend organisation. When JPA created the tables I saw that it uses a discriminator, the problem with this is that a supplier can also be a organisation. </p>
  
  <p>So what I basically want is (these are database tables to get the idea):</p>
  
  <p><img src="https://i.stack.imgur.com/doT3Z.png" alt="ERD showing subtyping with"></p>
  
  <p>A little example to help clarify this:</p>
  
  <p>We have a Customer called SparklingGlass. SparklingGlass buys computers from us so SparklingGlass is saved as our Customer. We in turn buy our windows from SparklingGlass, so SparklingGlass is also our Supplier. This is what we want to realize in our system.</p>
  
  <p>Is this in any way possible in JPA and ifnot, what is the best practice in these cases?</p>
  
  <p>BTW we use the JOINED inheritance type</p>