Re: Fetch Spec Question
Re: Fetch Spec Question
- Subject: Re: Fetch Spec Question
- From: Jonathan Rochkind <email@hidden>
- Date: Thu, 22 Jan 2004 10:40:39 -0600
At 9:21 AM -0500 1/22/04, Dana Kashubeck wrote:
Jonathan Rochkind wrote:
An EOFetchSpecification, passed to
someEditingContext.objectsWithFetchSpecification() will _always_ go
to the database. There will always be a round trip to the db
triggered.
Won't the fetch specification still get the objects out of memory
unless you set refreshesRefetchedObjects to YES? My understanding
is that this is the only way to force it to fetch from the database.
A trip to the database will occur in either case. SQL will get
generated. Certain rows will be returned by the db, and EOs
corresponding to those rows will be included in the NSArray returned.
_Which_ EOs are returned depends on what the database returns.
However, you are right, that the _attributes_, the actual _values_ of
those EOs, may come from memory. EOF will pay attention to _which_
rows are returned (ie, the primary keys), but may ignore the other
non-pk values of those rows, taking those values from memory instead.
As others have posted, there are numerous other customizations and
configurations you can perform to change this situation somewhat,
there are a bunch of factors that can effect it (settings on the
entity like 'read-only' for instance).
--Jonathan
--
-------------------------------------
Dana Kashubeck
Systems Manager
Riemer Reporting Service Inc.
http://www.riemer.com
Phone: 440-835-2477 x. 125
Fax: 440-835-4594
-------------------------------------
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.