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 sounds like a multiple (to-many) relationship. But if "objectIDPostingsForMonth is a foreign key", that would be a to- one relationship. Pierre's code is correct for a to-one relationship. It feels like you are modelling things wrong or naming them in a confusing manner.


Chuck




Pierre Bernard
Houdah Software s.à r.l.

On Jun 5, 2007, at 11:17 PM, Ted Archibald wrote:

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' with a fetch spec 'fetchNullPostingForMonth' with the qualifier '(objectIDPostingsForMonth = nil)'

Then in my code I have:

NSArray results = EOUtilities.objectsWithFetchSpecificationAndBindings( ec, "Posting", "fetchNullPostingForMonth", null);

To me this seems crude, but it does work. Is there a better way though?

 _______________________________________________
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:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects- lists%40houdah.com

This email sent to [EMAIL PROTECTED]

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend



 _______________________________________________
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:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to