Recently I found that the SQL generated by a fetch using setPrefetchingRelationshipKeyPaths with a to-many relationship generates the query without distinct while for to-one relationships uses distinct. Example:
Suppose you have entity A, B, C with the next relationships:
A <-> B
A <->> C
The next fetch spec
EOFetchSpecification fs = new EOFetchSpecification("A", null, null, true, false, null);
fs.setPrefetchingRelationshipKeyPaths(new NSArray(new String[] {"B", "C"}));
will produce 3 querys
select distinct ... from A ...
select distinct ... from B ...
select ... from C ...
Is there a way to override this behavior without doing something very complicated.
Thanks in advanced.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
