• 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
Fetching entities where optional attribute is set
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetching entities where optional attribute is set


  • Subject: Fetching entities where optional attribute is set
  • From: Tom Harrington <email@hidden>
  • Date: Fri, 18 Nov 2005 12:16:36 -0700

I have an entity which has an optional string attribute called "name".
 How can I configure a fetch request for all instances of this entity
that actually have a value set for this attribute?

I thought I'd want the predicate to be:

name != nil

But when I go through the predicate editor in XCode I get:

name != "nil"

...which doesn't seem to be the same thing, and dropping the quotes
doesn't seem to be possible.

Another possibility seems to be to leave the comparison value blank,
but that just gets me this:

name != ""

However if name is not set, it's not going to be an empty string, so
this also doesn't seem to be what I want.  How can I set up this
fetch?

--
Tom Harrington
email@hidden
AIM: atomicbird1
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Fetching entities where optional attribute is set
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Encrypt a string
  • Next by Date: Re: Fonts getting scaled when going XHTML -> NSAttribString
  • Previous by thread: Re: Incompatible types in Currency Converter tutorial
  • Next by thread: Re: Fetching entities where optional attribute is set
  • Index(es):
    • Date
    • Thread