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!!!

I will however, keep Anjo's trick in mind and plan for its implementation 
slowly. Just a thought, I see Anjo's thought and this issue fix should go into 
wonder and may go into these API's like:

updateRowsDescribedByQualifier(EOEditingContext ec, String entityName, 
EOQualifier qualifier, NSDictionary newValues, boolean 
shouldUpdateECPostOperation) and similar one for 
deleteRowsDescribedByQualifier() API.

Thanks so much for all your participation.




________________________________
From: "msch...@mdimension.com" <msch...@mdimension.com>
To: Anjo Krank <a...@krank.net>
Cc: Shravan Kumar. M <mshravan_...@yahoo.com>; WO Dev Group 
<webobjects-dev@lists.apple.com>
Sent: Mon, February 8, 2010 6:14:14 PM
Subject: Re: refresh EC after call to 
ERXEOAccessUtilities.updateRowsDescribedByQualifier()?

Good point .. That trick presumed that the update you performed didn't impact a 
qualified key.

forgetObject wouldn't remove from to-many relationships, right? So be careful 
on that.

Long story short -- messing around behind eof's back is a pain.

Sent from my iPhone

On Feb 8, 2010, at 3:55 AM, "Anjo Krank"<a...@krank.net> wrote:



> Wouldn't make much sense.
> 
> - you're using these methods to NOT fetch the involved objects. If you're 
> doing the fetch, you might as well save them by modifying the objects
> - if you fetch them *after* the modification, then, depending on your 
> qualifier, you might not get anything back at all (say, modifying status=done 
> where status=new)
> 
> What you *can* do is filter the EC's registeredObjects() with the same 
> qualifier, keep the GIDs, then update, then invalidate those objects. As for 
> the deleted objects, you should forgetObject() them.
> 
> Cheers, Anjo
> 
> Am 08.02.2010 um 06:04 schrieb Shravan Kumar. M:
> 
>> Thanks for your suggestion Mike. Sorry, I did not get your statement: do you 
>> mean after call to ERXEOAccessUtilities.updateRowsDescribedByQualifier(), 
>> should I immediately call EOFetchSpec 
>> withfetchSpec.setRefreshesRefetchedObject(true) and with same qual used in 
>> updateRowsDescribedByQualifier()?
>> 
>> From: Mike Schrag <msch...@mdimension.com>
>> To: Kieran Kelleher <kieran_li...@mac.com>
>> Cc: Shravan Kumar. M <mshravan_...@yahoo.com>; WO Dev Group 
>> <webobjects-dev@lists.apple.com>
>> Sent: Sun, February 7, 2010 9:32:38 PM
>> Subject: Re: refresh EC after call to 
>> ERXEOAccessUtilities.updateRowsDescribedByQualifier()?
>> 
>> for the update case, i was thinking just use the same qualifier with a 
>> refreshesRefetchedObjects on a fetch spec .... i think that won't refresh 
>> deleted objects, though, so I'm not sure the best way to do the delete case. 
>> if the objects were fetched into the eo already, then refreshAllObjects 
>> might do it.
>> 
>> On Feb 7, 2010, at 10:59 AM, Kieran Kelleher wrote:
>> 
>>> Off the top of my head, I would think something like this:
>>> 
>>> ec.setFetchTimestamp( System.currentTimeMillis() );
>>> ec.refreshAllObjects();
>>> 
>>> 
>>> 
>>> 
>>> On Feb 7, 2010, at 1:06 AM, Shravan Kumar. M wrote:
>>> 
>>>> Hello Group,
>>>> 
>>>> Is there any efficient way to refresh EOEditingContext after call to 
>>>> ERXEOAccessUtilities.updateRowsDescribedByQualifier()/ 
>>>> ERXEOAccessUtilities.deleteRowsDescribedByQualifier() API's, such that 
>>>> only the effected EO's in the EC gets updated as per these actions?
>>>> 
>>>> Thanks in advance,
>>>> Shravan Kumar. M
>>>> ---------------------------
>>>> 
>>>> __________________________________________________
>>>> Do You Yahoo!?
>>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>>> http://mail.yahoo.com/ _______________________________________________
>>>> 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/kieran_lists%40mac.com
>>>> 
>>>> This email sent to kieran_li...@mac.com
>>> 
>>> _______________________________________________
>>> 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/mschrag%40mdimension.com
>>> 
>>> This email sent to msch...@mdimension.com
>> 
>> 
>> _______________________________________________
>> 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/anjo%40krank.net
>> 
>> This email sent to a...@krank.net
> 


      
 _______________________________________________
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 arch...@mail-archive.com

Reply via email to