PreFetch Hints without Qualifiers

"Eric Bergerson" <[email protected]>
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
I have a simple schema:
  Candidates toMany Matches toOne Masters

My application displays Candidates and the Match and Master information
related to each Candidate.  Since both Match and Master instances related to
each displayed Candidates are accessed each time, I use prefetch hints to
bring in the related Match and Master for each candidate.

Normally this works fine.  As long as I have some form of qualification on
my fetchSpecification, I get the query generation I expect:

1.) fetch of the qualified candidates;
2.) fetch of the qualified matches that can be joined to the qualified
candidates.
3.) fetch of the masters that can be joined to the qualified matches that
can be joined to the qualified candidates.

When I send the same exact fetch specification, either with a null qualifier
or an empty EOAndQualifier, I don't get the same fetches.  Rather it
generates a fetch of all the objects in each of the three entities.

Of course, this is total overkill.  It should fetch all of the candidates,
but it should only fetch the matches and masters that can be joined back to
the candidates.  In my case, for instance, less than a third of the masters
have a join back to the candidates, so I don't need to bring the other two
thirds of the objects into memory.

Does anyone know why this is happening and how to prevent it?

Sincerely,

Eric Bergerson
Contact Info: http://www.ukibi.com/eb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.