Community
Participate
Working Groups
JPA inheritance doesn't have a way to specify if reading an intermidiate class should return subclasses or just the base class. Eclipselink InheritancePolicy has a shouldReadSubclasses flag to turn off reading of subclasses and options to allow using joins or views for queries which are not currently supported in the EclipseLink-ORM.XML Schema.
Updating priority due to revised bug categorization process. See the following page for details: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines#Priority_and_Target_Milestone If you feel the updated priority is incorrect, please send an email to eclipselink-users@eclipse.org.
Does JPA 2.0's type constructs in JPQL and criteria handle this functionality adequately? http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/entity_type_expressions
Type constructs allow queries to be formed that are specific to a particular class, giving the ability to exclude subclasses. This is a great workaround at the JPA query level. The native EclipseLink functionality though is at the Entity level, allowing all queries to exclude or include subclasses - allowing for even em.find(1, Project.class) to return only Project entities and not SmallProject and LargeProject instances (should they have a pk value of 1). Type constructs do allow adding constraints to queries that would exclude classes, but this exclusion relies on database filtering (and I'm not sure how this affects table per class). The native shouldReadSubclasses flag value of false is an optimization if subclasses are not required.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink