Re: Updating Nested To-Many Relationship
Re: Updating Nested To-Many Relationship
- Subject: Re: Updating Nested To-Many Relationship
- From: Clark Mueller <email@hidden>
- Date: Mon, 9 Apr 2007 09:11:26 -0600
You can also have a look at some more in depth discussion of this
topic on the WikiBook:
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/
Caching_and_Freshness
Clark
On 9 Apr 07, at 9:06 AM, Zak Burke wrote:
David Avendasora wrote on 4/5/07 2:32 PM:
I want to allow the user to move a RSComponent from one
RoutingStep to another. I present the user with a WOPopUpButton on
each rsComponent of all the RoutingSteps and they can simply pick
which one they want it in. It does update everything properly, but
when the page comes back, layout-wise the RSComponent is still in
the original RoutingStep, but in the database it is in the new
RoutingStep (right where it's supposed to be).
Why would the update be done properly, but the page not be fully
updated with the changes?
Because EOF loves its cache. Loves it, loves it, loves it. IMNSHO,
caching should be OFF by default because it's behavior is so
confusing: you run an update, see the changes in the DB, then run a
query and ... see no changes in the UI. WTF?
At any rate, try the following:
// assuming you construct a fetch-spec "f"
EOFetchSpecification f = new EOFetchSpecification(...);
f.setRefreshesRefetchedObjects(true);
and see if your UI gets properly updated.
Don't get me wrong, WO's cache handling is top-notch. But having
values cached when you haven't explicitly asked for that behavior is
downright confusing the first time you encounter it.
zak.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
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