How to fetch Null objects

2007-06-05 Thread Ted Archibald
Is there a more elegant way of trying to fetch null objects? Currently I have an object 'Posting' with a fetch spec 'fetchNullPostingForMonth' with the qualifier '(objectIDPostingsForMonth = nil)' Then in my code I have: NSArray results = EOUtilities.objectsWithFetchSpecificationAndBindings( ec

Re: How to fetch Null objects

2007-06-05 Thread Ted Archibald
I forgot to mention that "objectIDPostingsForMonth" is a foreign key and the relationship in the entity Posting is called "postingsForMonth" On 6/5/07, Ted Archibald <[EMAIL PROTECTED]> wrote: Is there a more elegant way of trying to fetch null objects? Currently I have an object 'Posting' wit

Re: How to fetch Null objects

2007-06-05 Thread Kieran Kelleher
In code, you can use EOKeyValueQualifier with a value of NSKeyValueCoding.NullValue which is a substitute for null where null cannot be used in Apple's frameworks. On Jun 5, 2007, at 5:13 PM, Ted Archibald wrote: Is there a more elegant way of trying to fetch null objects? Currently I have

Re: How to fetch Null objects

2007-06-05 Thread Chuck Hill
What do you mean by "null objects"? Objects with a specific attribute that is null? With a to-one relationship that has no object in the destination? With a to-many that has no objects in the relation? Something else? Chuck On Jun 5, 2007, at 2:13 PM, Ted Archibald wrote: Is there a

Re: How to fetch Null objects

2007-06-05 Thread Pierre Bernard
new EOKeyValueQualifier( "postingsForMonth" /* let EOGenerator create a constant */, EOQualifier.QualifierOperatorEqual, NSKeyValueCoding.NullValue); Pierre Bernard Houdah Software s.à r.l. On Jun 5, 2007, at 11:17 PM, Ted Archibald wrote: I forgot to mention that "objec

Re: How to fetch Null objects

2007-06-05 Thread Chuck Hill
Something just feels wrong here with Ted's code. On Jun 5, 2007, at 2:38 PM, Pierre Bernard wrote: new EOKeyValueQualifier( "postingsForMonth" /* let EOGenerator create a constant */, EOQualifier.QualifierOperatorEqual, NSKeyValueCoding.NullValue); postingsForMonth sou