Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents
 Search
 PDFComments
Comments


TREAT

Use TREAT to cast an object as its subclass value (that is, downcast related entities with inheritance).


Examples

Example 3-14 shows how to use this JPQL extension.

Example 3-14 Using TREAT EQL

SELECT e FROM Employee JOIN TREAT(e.projects AS LargeProject) p WHERE p.budget > 1000000


See Also

For more information, see: