Editing context not reflecting edits?
Editing context not reflecting edits?
- Subject: Editing context not reflecting edits?
- From: Benjamin Adair <email@hidden>
- Date: Mon, 27 Sep 2004 18:19:49 -0500
Woo, two messages in a day. I can't get enough of you all. :)
So, I worked around my PK as attribute deal but stumbled upon something else that really has stumped me.
In one component, the user editor, the user adds a group membership and saves. My component gets the default editing context from the session and tells it to save the changes. (I watch the database log and see that correlation table between users and groups does in fact get an insert.) Next the user clicks on the link to go to the group editor, within which I use the same default editing context method via the session to retrieve the list of groups. Except here, I'm not seeing that user that was just added to the group.
When the save button is hit the changes are automagically taken from the request and saved thusly:
// Save the changes made in the editing context to the database
session().defaultEditingContext().saveChanges();
and then later, in the groups component I use this to generate the list of groups:
// Build the fetch specification to fetch the complete list of web groups
groupsFetchSpec = new EOFetchSpecification( "WebGroup", null, sorting );
...
return session().defaultEditingContext().objectsWithFetchSpecification( groupsFetchSpec );
Thoughts? Why, when I make an edit to a group, will I see that edit reflected in the user component, yet not the other way around? My relationships (flattened through the many to many) are exactly the same, option-wise.
Thank you muchly,
Ben
--
Benjamin Adair
Central Office Database Programmer/Analyst
Cancer & Leukemia Group B
Phone: 773-702-6731
Fax: 312-345-0117
Email: email@hidden
Web: http://www.calgb.org/ _______________________________________________
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