• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using distinct in to-many relationship?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Using distinct in to-many relationship?
      • From: Zak Burke <email@hidden>
  • Prev by Date: Re: help with mysql
  • Next by Date: Re: Using distinct in to-many relationship?
  • Previous by thread: Re: Reusable translated button
  • Next by thread: Re: Using distinct in to-many relationship?
  • Index(es):
    • Date
    • Thread