Hi Oscar,

Keep in mind, you do not war to check for null, as a to-many relationship on an 
EO will not ever be null (except when in the process of initially creating an 
EO in the first place). It will be “empty” as in it will return an NSArray with 
zero elements in it. 

The good news is that as of about a month ago, ERXKey now has the following 
convenience methods to create the following qualifiers:

isEmptyRelationship()
isNotEmptyRelationship()


To get the qualifier you would write:
EOQualifier thatDoNotHaveAnAddress = Person.ADDRESSES.isEmptyRelationship();

You can use that in a fetch or to filter a NSArray<Person>.

It really is that easy now. Hard to believe it took that long for WO to be able 
to do something that simple.

Dave


On May 15, 2014, at 5:07 PM, Oscar González <racso...@hotmail.com> wrote:

> Hi list,
> I'm trying to generate a ERXKey to check to many relationship is null in the 
> database.
> Person-->>Address
> I want all the persons that have no address.
> 
> 


—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to