On Dec 9, 2006, at 6:48 AM, Dov Rosenberg wrote:

The main reason for my question centers around the fact that in some places of our app we needed to use JDBC directly for performance reasons (mainly the bulk operations). Of course when that happens the object graph can get
out of sync with reality.

All editingcontexts (including the shared editing contexts) would need to be informed. In our case doing an invalidate would probably be pretty costly
since it might get triggered on a frequent basis.

That depends on how many objects you are invalidating (I am not reccomending invalidating all of them!) and how many editing contexts have those objects faulted into them.


If we wanted to freshen only the current editing context is there a way to
do that?

You could fetch raw rows and merge them into the EOs in the editing context. But that would not update the snapshot so you would not be able to save without getting an optimistic locking failure. Anything else is going to update the snapshot and doing so will send notifications to all the other editing contexts.


Chuck


On 12/8/06 11:26 PM, "Chuck Hill" <[EMAIL PROTECTED]> wrote:

This always makes my head hurt, but I will take a stab at it.

invalidate: tosses the snapshot, affects all editing contexts.
Forces the data to be refetched from the database.

refault: changes the eo back into a fault in the EC.  Depending on
the EC's fetch timestamp and the snapshot's age, it _may_ go back to
the database for fresh data when the fault is fired.  I think this
discards any uncommited changes.

refresh: pretty much the same as refault, but merges uncommitted
changes back into eo.

I have found problems with refault() and refresh() and created my own
versions that you can find in EOObject in our GVCEOFExtensions
framework.  Sorry, but I don't recall the details right now.

Chuck


On Dec 8, 2006, at 2:10 PM, Dov Rosenberg wrote:

What is the difference between Invalidating an object versus
refreshing versus refaulting?

It seems that some of the methods call the others. Any commentary
on which should be used and when would be appreciated. Thanks in
advance


--
Dov Rosenberg
Conviveon/Inquira
Knowledge Management Experts
http://www.conviveon.com
http://www.inquira.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%
40global-village.net

This email sent to [EMAIL PROTECTED]

--
Dov Rosenberg
Inquira Inc
370 Centerpointe Circle, ste 1178
Altamonte Springs, FL 32701
(407) 339-1177 x 102
(407) 339-6704 (fax)
(407) 310-8316 (cell)
[EMAIL PROTECTED]
AOL IM: dovrosenberg


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to