Fetching entities where optional attribute is set
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