New Posts New Posts RSS Feed: PersistenceManager.Refetch
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

PersistenceManager.Refetch

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: PersistenceManager.Refetch
    Posted: 12-Jul-2007 at 4:27pm
Can anyone provide a simpler example for PersistenceManger.RefetchEntites than provided in End_HandleCocurrencyConflicts?
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 4:28pm

That is a fairly complex scenario presented in the tutorial.  Is your question related more to why and when you'd want to use a Refetch, or how to use it?

Handling concurrency conflicts has been our "standard" use case for situations in which you know you want to refetch entities from the data source, and know what you want to do with the newly refetched data in terms of merging into local cache. 

A Refetch (and the various overloads) is really just a helper method which bypasses the quite complex internal logic which determines what data can be found locally vs. what must be retrieved from the data source.  It's essentially the same as re-running your query with a DataSourceOnly fetch strategy, but also allows you control over the subset of entities wanted.  Refetch is really not something you ever have to do - it's just available if you want it.

Both the Developer's Guide and Concepts manual have some discussions of "forced refetch", and also merge strategies, which may help some.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down