Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Behaviour of objectsWithFetchSpecification()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Behaviour of objectsWithFetchSpecification()



Hi Ken,

On 22/01/2009, at 10:01 PM, Ken Anderson wrote:

Deleting an EO is really just like setting a flag until you save, so this behavior is really no surprise.

Yeah, it certainly matches exactly with the description in the API docs, so I was only surprised because I hadn't read them closely enough.


Actually, though, my surprise wasn't so much that a deleted object was being returned, but that an object that had been modified in the EC so that, say, if I hadn't deleted it, but instead called saveChanges(), it wouldn't have matched the fetchSpec. That is, the fetchSpec asked for objects where bar() == theBar. I had already called setBar(null), which is why I wasn't expecting to see that object in the results. That I had also called deleteObject() was incidental. Anyway, it _still_ matches the description in the API docs (the promise is just that the matching EO in the external store won't overwrite the (now not matching) object in the EC), so the surprise is entirely self- inflicted.

It doesn't exactly match your needs, but hopefully it will help!

Thanks for that code.


-- Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


_______________________________________________ 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
References: 
 >Behaviour of objectsWithFetchSpecification() (From: Paul Hoadley <email@hidden>)
 >Re: Behaviour of objectsWithFetchSpecification() (From: Ken Anderson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.