Using distinct in to-many relationship?
Using distinct in to-many relationship?
- Subject: Using distinct in to-many relationship?
- From: Marcos Trejo Munguia <email@hidden>
- Date: Mon, 21 Aug 2006 13:17:35 -0500
Hi List:
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden