Re: How do I refresh a many-to-many?
Re: How do I refresh a many-to-many?
- Subject: Re: How do I refresh a many-to-many?
- From: Chuck Hill <email@hidden>
- Date: Wed, 18 Apr 2007 12:00:19 -0700
Hmmm. I think the problem is more likely that Kevin is using
addToClubs instead of addObjectToBothSidesOfRelationshipWithKey.
Kevin: the latter method is the preferred way to join object, it
calls addToClubs and anything that is needed internally).
Chuck
On Apr 18, 2007, at 11:54 AM, Robert Walker wrote:
http://developer.apple.com/documentation/WebObjects/
Enterprise_Objects/Fetching/chapter_6_section_7.html#//apple_ref/
doc/uid/TP30001011-CH206-BADDGFAG
This is a page that explains how to "Ensure Fresh Data." Warning:
It's not for the feint of heart. This is actually more complicated
that it initially seems. By default snapshots are cached for 60
minutes. This is typically too long unless your data is pretty
static and stale data isn't a major problem.
In cases like your you will need to balance the benefits of the
snapshot caching and data freshness using the mechanisms described
in the above document.
The place to start is with the method on EOFetchSpecification
called setRefreshesRefetchedObjects(true);
On Apr 18, 2007, at 12:49 PM, Kevin Windham wrote:
I have an app with users and clubs. There is a many-to-many
between these objects. I allow one user to add another user to
their club through a page that fetches the particular user they
want to add and then calls the new users addToClubs method. This
much works fine. I can go look in my DB and see that the user has
been added. However, when I redisplay the original user's club
page, the new user does not show up. If I log out of the app and
log back in, the new user shows up.
I tried adding a refreshObject call on the original user, but that
doesn't seem to help. How can I refresh the many to many on my
original user?
Thanks,
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
Robert Walker
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:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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