• 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: exclude some relationships/entities from fetchTimestamp?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exclude some relationships/entities from fetchTimestamp?


  • Subject: Re: exclude some relationships/entities from fetchTimestamp?
  • From: Chuck Hill <email@hidden>
  • Date: Sun, 15 Feb 2015 01:00:02 +0000
  • Thread-topic: exclude some relationships/entities from fetchTimestamp?

There are some EODatabaseContext.Delegate methods that might do what you want, but they will affect all Ecs, not just the temp one.

Chuck

On 2015-02-14, 3:34 AM, "OC" wrote:

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

This email sent to email@hidden
 _______________________________________________
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: 
 >exclude some relationships/entities from fetchTimestamp? (From: OC <email@hidden>)

  • Prev by Date: Re: ordered and filtered fault efficiency
  • Next by Date: Re: caching global IDs does not work as expected (followup: ordered and filtered fault efficiency)
  • Previous by thread: exclude some relationships/entities from fetchTimestamp?
  • Next by thread: way too many SELECTs?
  • Index(es):
    • Date
    • Thread