• 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: ERXKey to check to many relationship is null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXKey to check to many relationship is null


  • Subject: Re: ERXKey to check to many relationship is null
  • From: David Avendasora <email@hidden>
  • Date: Mon, 19 May 2014 11:12:06 -0400

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 <email@hidden> 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ERXKey to check to many relationship is null
      • From: Flavio Donadio <email@hidden>
References: 
 >ERXKey to check to many relationship is null (From: Oscar González <email@hidden>)

  • Prev by Date: Re: [ANN] Montage Studio
  • Next by Date: Re: ERXKey to check to many relationship is null
  • Previous by thread: Re: ERXKey to check to many relationship is null
  • Next by thread: Re: ERXKey to check to many relationship is null
  • Index(es):
    • Date
    • Thread