Community
Participate
Working Groups
In EclipseLink 2.5.2, using the TREAT() operator in a query on entities which use the inheritance strategy table per class does not work. Since support for table per class is optional in the JPA 2.1 specification, it has not been implemented it would appear in EclipseLink. I have tested with the latest EclipseLink version 2.5.2. It does not work for single-table and joined inheritance strategies since they both use an inheritance policy rather than an interface policy which is used for entities with an inheritance strategy table per class. Please see defect 374771 for reference whereby support for the TREAT operator was implemented in EclipseLink 2.5.1 to comply with the JPA 2.1 specification. An implementation for entities using the ihnertiance strategy table per class should be also provided so that one can downcast types using this inheritance strategy.
Just to clarify, using the TREAT operator on queries work for single-table and joined inheritance strategies since they both use an inheritance policy rather than an interface policy which is used for entities with an inheritance strategy table per class.
any news regarding this feature ?
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink