Re: Cached EO Objects
Re: Cached EO Objects
- Subject: Re: Cached EO Objects
- From: James Cicenia <email@hidden>
- Date: Sun, 25 Jul 2004 20:33:17 -0500
Hello -
I am an experienced novice with WebObjects being that I created a
successful
application with it and am now learning the wo way.
The first thing that I had to learn was that I should never think about
the database.
Impossible, I know, I have to remind myself not to think about the
database all the
time. What does this all mean. Don't worry.. .let EO do its caching and
you just
worry about the getting the application working. I have not found any
performance
issues yet in my application.
My application is a mix of relationships and fetches. I would assume,
and I could
be wrong, but that the filteredArrayWithQualifier would not hit the
database
unlike the fetch.
As for your example, if you use a fetch, it would always go to the
database, however,
in a relationship I would assume that subsequent calls would not go to
the database
but instead be directly cached. I could be way off base here, but, that
is how I have
resolved it in my head and in my coding approach.
-James Cicenia
On Jul 25, 2004, at 7:31 PM, Lotsa Cabo wrote:
> SCENARIO:
> One WOComponent/page called "PostDetails"... One object in the EO model
> called "Message"... One table in the database called "MESSAGE". The
> page has a display group calling a fetch specification where a value is
> passed in an a single object (a "message") is returned.
>
> QUESTION(S):
> In this scenario, will the database be hit again? If so, I assume EO
> will evaluate the rows returned (a single row) and determine if the
> object is already within the editing context. Unfortunately, the trip
> will already be made to the database. Is this correct? Actually, I
> assume that any time a fetch specification is used, the database will
> be hit again, no?
>
> I guess the more I read about cached EO objects, the more confused I
> become. I cannot think of a scenario where the database would not be
> hit if using a generic object set. For example, if I want all
> "Messages" where the email address is from "1@2.3" I would assume that
> the database will always be hit, even if I have objects cached in the
> editing context. I mean, if not, then how will it be possible to know
> if there are any new objects in the database?
>
> Aaaw, heck. Anyone?
>
> Thanx,
> Ryan
>
> _________________________
> Tired of spam? Signup for a FREE SpamJammer.Com account and say
> goodbye to junk email forever!
> _______________________________________________
> 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.