Re: to-one fault: determine if will take trip to db?
Re: to-one fault: determine if will take trip to db?
- Subject: Re: to-one fault: determine if will take trip to db?
- From: Art Isbell <email@hidden>
- Date: Thu, 19 Feb 2004 14:01:12 -1000
On Feb 19, 2004, at 11:34 AM, Jonathan Rochkind wrote:
What's the best way for me to determine if clearing the fault will
require a trip to the db?
I assume that EOEditingContext's committedSnapshotForObject() would
return an empty dictionary (or maybe null although that's not a
documented return value) if no snapshot exists which would mean that a
DB access would occur.
But it's not clear to me what committedSnapshotForObject() would
return if a fetch timestamp has been set and the fetch timestamp for
the object has expired. So maybe EODatabase's timestampForGlobalID()
would be the better way to determine whether a fetch will occur when a
fault is fired. It will return DistantPastTimeInterval if no snapshot
exists or the timestamp of an existing snapshot.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.