Re: refresh EC after call to ERXEOAccessUtilities.updateRowsDescribedByQualifier()?
Re: refresh EC after call to ERXEOAccessUtilities.updateRowsDescribedByQualifier()?
- Subject: Re: refresh EC after call to ERXEOAccessUtilities.updateRowsDescribedByQualifier()?
- From: Anjo Krank <email@hidden>
- Date: Mon, 8 Feb 2010 20:13:40 +0100
Mostly, it depends on what you are doing. Changing, say, status=done is different from owner=<people pk:1>, because the one only changes internal state, the other touches relationships.
Then again, all your *other* ECs in all *other* instances won't get notified anyway (unless you use the ERCNF). So your code needs to be able to handle that problem anyway.
Cheers, Anjo
Am 08.02.2010 um 20:02 schrieb Mike Schrag:
>> Mike's precautionary measure is ticking at the top of my mind... so may be for the time being I will just call ec.refreshAllObjects() just to be integral, consistent, simple and more importantly let not annoy EOF by mistake!!!
> my precautionary tale is about using the methods you're using at all (i.e. the updateRowsDescribedByQualifier) ... you're sneaking behind EOF and basically doing direct DB operations. you're then trying to come back and expect an easy way for EOF's caches to be in-sync with your changes. the general case here is that you can't do it without tossing all your snapshots, because you have no idea if the snapshots in your cache are actually in-sync with the current state of the database when you executed your update. there's a reason EOF does what it does when you perform all of these operations, and it's because it actually needs to.
>
> probably the closest-to-right way to do this is to prefetch the rows that would be updated or deleted, perform the operations, then use the GIDs to ... i guess manually do everything that EOF would have done. you're going to lose all the inverse relationship updating, and you're going to lose delete rules, etc. also, by fetching into the EC beforehand, you're basically taking the performance hit that you were probably trying to avoid in the first place by using those API's.
>
> so i doubt there's a simple generalized API that will go into Wonder for this -- i'm not people would be happy with the performance profile of it.
>
> ms
_______________________________________________
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