Description
JPA2.0 spec defines TYPE discriminator which can be used in JPQL query to return polymorphic query results. The spec is unclear that the TYPE discriminator is for Single table inheritance or it can be used for Table per class or inheritance type Joined or not.
The initial implementation in OpenJPA has limited it for Single Table inheritance, but it does not block the usage for the other 2 types of inheritance.
This resulting incorrect SQL generated and SQLExceptions.