• 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
Re: qualifier to check for empty toMany
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qualifier to check for empty toMany


  • Subject: Re: qualifier to check for empty toMany
  • From: Alexis Tual <email@hidden>
  • Date: Fri, 13 May 2011 11:53:38 +0200

There's a simple way if you have a A ->> B, to fetch all the A's having no B's :

EOQualifier qual = ERXQ.isNull(A.TO_BS_KEY + "." + B.ID_KEY);

Beware, the to-many relationship must be of type "Left Outer" in your model

Hope it helps.

Alex

Le 11 mai 2011 à 23:29, Fred Wells a écrit :

Hey all,
Maybe I missed something but is there a way to construct a qualifier that check that a toMany relationship is empty? Simply putting in "toMany =%@, new NSArray(new Object[] {NSKeyValueCoding.NullValue}doesn't do it because it tries to check across the join table which results in no objects being found.

-fw

------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.
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
References: 
 >qualifier to check for empty toMany (From: Fred Wells <email@hidden>)

  • Prev by Date: EOQualifier Filtered Array - unexpected results
  • Next by Date: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship
  • Previous by thread: Re: qualifier to check for empty toMany
  • Next by thread: Examles from apple webobjects 5.4.3 any good
  • Index(es):
    • Date
    • Thread