Hello there,

another possible way of optimization would be if I did not refetch _all_ 
objects touched, but only those which do need a refetch.

Means, when saving important data which can be changed anytime by another 
thread or instance, I exploit the pattern

===
EOObjectStore osc=ec.rootObjectStore()
osc.lock()
try {
   EOEditingContext tempec=ERXEC.newEditingContext(osc)
   tempec.fetchTimestamp=System.currentTimeMillis()
                    
   def 
tempau=auction.localInstanceIn(tempec),tempusr=user.localInstanceIn(tempec)
   ... ... ...
===

and then I am using tempau, tempusr and their relationships knowing they 
definitely are as fresh as possible.

That's great and works like a charm. Nevertheless, there are _some_ special 
reationships of which I happen to know -- based on my business logic -- they 
_can't_ ever be stale; the appropriate EOs are refetched anyway, though, caused 
by fetchTimestamp.

It would help if I could somehow tell to the temporary EC that either some 
relationships, or -- this would make much more sense in general -- some 
entities _do not_ need to be refetched, and if it finds snapshots of their EOs 
in the stack, it could freely use the cached values, regardless fetchTimestamp.

Is there a way to achieve that, or something functionally similar?

Thanks,
OC


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

This email sent to [email protected]

Reply via email to