This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 222295 - add read-subclasses-on-queries support to the EclipseLink-ORM.XML Schema
Summary: add read-subclasses-on-queries support to the EclipseLink-ORM.XML Schema
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 325781
  Show dependency tree
 
Reported: 2008-03-11 15:38 EDT by Chris Delahunt CLA
Modified: 2022-06-09 10:30 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Delahunt CLA 2008-03-11 15:38:59 EDT
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.
Comment 1 Tom Ware CLA 2009-04-16 10:59:28 EDT
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.
Comment 2 Doug Clarke CLA 2009-12-07 14:52:37 EST
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
Comment 3 Chris Delahunt CLA 2009-12-08 11:57:29 EST
 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.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:30:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink