Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316324

Summary: Throw informative exception on attempt to use FetchGroups when no Weaving
Product: z_Archived Reporter: Shaun Smith <shaun.smith>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: douglas.clarke, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://wiki.eclipse.org/EclipseLink/Development/2.1/AdvancedJPA_Queries/FetchGroup
Whiteboard:

Description Shaun Smith CLA 2010-06-09 11:20:09 EDT
Attempting to set a FetchGroup on a query when weaving has not been performed results in the exception:

Exception Description: You must define a fetch group manager at descriptor <CLASSNAME> in order to set a fetch group on the query (null)

If the only reason for there to be no fetch group manager is because weaving was not performed then the exception should indicate that configuring weaving may resolve this issue. If there are other possible root causes then those should be described also so that the developer can avoid this exception.
Comment 1 Doug Clarke CLA 2010-06-14 15:34:29 EDT
While weaving is generally how FetchGroup support is enabled the real requirement is that the entity class properly implements FetchGroupTracker. 

The exception I get adding named FetchGroups to an entity that doe snot implement FetchGroupTracker is:

Exception [EclipseLink-199] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: In order to use Fetch Group, the domain class (class model.Employee) has to implement FetchGroupTracker interface.
Descriptor: RelationalDescriptor(model.Employee --> [DatabaseTable(EMPLOYEE), DatabaseTable(SALARY)])
Comment 2 Tom Ware CLA 2010-06-15 11:13:26 EDT
Setting target and priority.  See the following page for details of the meanings of these:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:05:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink