• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invalidate vs Refresh vs Refault
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalidate vs Refresh vs Refault


  • Subject: Re: Invalidate vs Refresh vs Refault
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 9 Dec 2006 16:53:55 -0800


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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net

This email sent to email@hidden

-- 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@hidden AOL IM: dovrosenberg


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Invalidate vs Refresh vs Refault (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: Invalidate vs Refresh vs Refault
  • Next by Date: Re: Question about Session
  • Previous by thread: Re: Invalidate vs Refresh vs Refault
  • Next by thread: Re: Invalidate vs Refresh vs Refault
  • Index(es):
    • Date
    • Thread