Use of derived Attributes
Use of derived Attributes
- Subject: Use of derived Attributes
- From: Steve Sharman <email@hidden>
- Date: Sun, 25 Apr 2004 16:21:50 +0100
Dear all,
I have an entity called (originally!) person, which has attributes
lastName and firstName in it. I also have a derived attribute called
fullName, which is defined in EOModeler as lastName+','+firstName,
external type varchar. I am using fullName in a number of list pages
in my D2W application.
In my simple D2W application, when a new person object is created and a
search then executed that will return results including the newly
created object, that new object appears as expected, but with a blank
fullName. If I shut the instance down and restart, and re-execute the
search, then the new object appears in the results list, with the
fullName presented as expected.
I think I understand what the problem is - presumably EOF is caching
the newly created object in memory on the server, and when it is
returned by the first search, fullName is blank because this would
normally be generated during the fetch from the database? Shutting down
WO obviously flushes the cache etc, and so when the object is then
fetched from the database, the derived attribute is generated
correctly....
So.... is my understanding of the situation about right - and
regardless, is there something that I can do to overcome the situation?
Can I not use derived attributes in D2W applications, or is there some
way of forcing new objects to be refetched from the database before
being used (this feels like it is going against EOF in some way....).
I'm using WO 5.2.3 on Panther 10.3.3, Java 1.4.2, database is Sybase.
Many thanks for any suggestions and help,
-- Steve
_______________________________________________
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.