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 protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/alexis.tual%40gmail.com
>
> This email sent to [email protected]
_______________________________________________
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]