Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] Fetch Groups


The FetchGroupTracker interface is used internally to indicate that a domain class is setup for use of fetch-groups. This generally added to your domain classes through dynamic or static weaving. This and the corresponding FetchGroupManager implementations are automatically created at runtime assuming your domain classes are woven and you have either a lazy basic mapping or manually configure a default fetch-group.

NOTE: I received an email from another user of the nested-fetch-group example that they had some test failures in the project when using static weaving that are not seen with dynamic weaving. The root cause of the difference has yet to be determined.

If you check out the complete source to the example you can try the provided test cases.


-----Original Message-----
From: Mathias Walter []
Sent: Wednesday, August 19, 2009 8:01 PM
To: EclipseLink User Discussions
Subject: [eclipselink-users] Fetch Groups


is there any example how to implement FetchGroupTracker?

The EclipseLink Wiki explains how to set the fetch groups, but not how to
implement FetchGroupTracker.
Unfortunately, FetchGroupTracker must be implemented for all entities
participating in a fetch group. And also a DescriptorCustomizer seems to be
necessary for each of these entities which instantiates a new
FetchGroupManager. That's a bit ugly in my opinion but could be easily
implemented and copy & paste in persistence.xml. Or is there an easier way?

If the FetchGroupManager is not instantiated a QueryException with error
6114 is thrown:

"You must define a fetch group manager at descriptor <entity> in order to
set a fetch group on the query <query>."

Is there a full example how to use fetch groups?

I also tried EclipseLink 2.0, but got the same errors. My main goal is to
use Nested Fetch Groups as explained at and
bug 244124.

Kind regards,

eclipselink-users mailing list

Back to the top