Re: SharedEditingContext Write Locks?
Re: SharedEditingContext Write Locks?
- Subject: Re: SharedEditingContext Write Locks?
- From: Lachlan Deck <email@hidden>
- Date: Tue, 15 Nov 2005 14:53:10 +1100
Hi there,
On 15/11/2005, at 1:20 PM, Dov Rosenberg wrote:
We took a closer look at our code and made some changes. We were
using a
method out of EOUtilities to get data instead of using
objectsWithFetchSpecification. Hopefully that will clear up our
issue. I
will let everyone know if that works.
It should help.
A point of clarification:
Based on one of the links that someone sent along, it seems like the
SharedEditingContext should never be passed into a method to do a
fetch
unless objectsWithFetchSpecification is used.
Correct. The other option is using a named FetchSpec defined in the
EOModel.
As far as my understanding goes, you can pass it around all you want
but...
- It shouldn't ever be used for manual fetches (ala EOUtilities).
Utilise localInstance[s]OfObject[s] into an ec with no sharedEC
reference for editing.
- You should only be fetching things into the SEC that will in most
circumstances survive for reasonable periods of time throughout the
apps life (e.g., a products list [1] or contact info)
It seems that
objectsWithFetchSpecification is used to load the SEC, I am not
sure why I
would use objectsByEntityName or
You use this one if providing the FetchSpec programmatically...
objectsByEntityNameAndFetchSpecificationName.
..and this one if using a named fetch spec when you loaded in the items.
It seems that these methods
could return a huge number of objects.
They'll return the number of objects that the FetchSpec defines
should be fetched. A FetchSpec with a qualifier will limit the
selection.
Is the idea that you could filter the
Shared objects in memory like you would in the DB?
Yep. i.e., treat the SEC as a _generalised_ source of info that all
sessions, direct actions, may want access to. They won't always want
all the info for a given task but we don't want to be _specialising_
the fetch into the shared ec for one particular session. Instead the
session pulls out of the SEC the specialised info it needs from the
more general collection of items.
with regards,
--
Lachlan Deck
_______________________________________________
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