Re: Behaviour of objectsWithFetchSpecification()
Re: Behaviour of objectsWithFetchSpecification()
- Subject: Re: Behaviour of objectsWithFetchSpecification()
- From: Paul Hoadley <email@hidden>
- Date: Thu, 22 Jan 2009 22:17:56 +1030
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