Re: "Volatile" EOF classes
Mike Schrag <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Also setRefreshesRefetchedObjects(true) on an EOFetchSpecification will update the snapshots for the objects it fetches. Though I think this will only find updated and added objects, and not deleted objects. I'm actually not sure of the best-practice way to refresh that something is now deleted? ms On Nov 1, 2006, at 8:38 AM, Kieran Kelleher wrote: > Hi Randy, > > Invalidating all objects in the root store is the sledgehammer > approach! ..... the gentler way to achieve what you want is as > follows: > > Each time you want to fetch latest database state, simply create a > fresh editing context, setFetchTimestamp() to current time and > fetch objects into the editing context. Those objects will be as > fresh as the timestamp you set on the ec.... and the EOF object > store cache snapshots automatically get updated so other ec's > benefit too. > > You can also alternatively do a refaultAllObjects and subsequent > setFetchTimestamp on an existing editing context. > > See EOEditingContext API docs for more info. > > HTH, > > Regards, Kieran > > On Oct 31, 2006, at 6:13 PM, Randy Wigginton wrote: > >> >> Is there a "nice" way to force EOF to ALWAYS load a certain class >> from the DB? I have a table that is being modifed by a different >> process, and I always want to get the very latest data. What I'm >> using right now is very brute-force (invalidate all objects on the >> root store). >> _______________________________________________ >> WebObjects-dev mailing list >> [email protected] >> http://www.omnigroup.com/mailman/listinfo/webobjects-dev > > _______________________________________________ > WebObjects-dev mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/webobjects-dev