Bug 441544

Summary: TREAT() table per class inheritance strategy support
Product: z_Archived Reporter: David Winters <dwinters>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: asafbennatan, dwinters
Version: unspecifiedKeywords: api
Target Milestone: ---   
Hardware: All   
OS: Unix All   
Whiteboard:

Description David Winters CLA 2014-08-11 16:07:53 EDT
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.
Comment 1 David Winters CLA 2014-08-11 16:13:30 EDT
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.
Comment 2 Asaf Natan CLA 2016-10-03 09:58:47 EDT
any news regarding this feature ?
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:19:38 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink