first time relationship problem
first time relationship problem
- Subject: first time relationship problem
- From: Theodore Petrosky <email@hidden>
- Date: Thu, 2 Aug 2007 07:40:00 -0700 (PDT)
I am relatively new to WO.. I finally put together a
web application (internal to the company) that is not
very big.
I am using the examples in the Marker book to create a
to-many relationship. (publications have sections). I
I just implemented a removeSection action with this
code:
public WOComponent deleteSection() {
// System.out.println("deleting a row!");
session().defaultEditingContext().deleteObject(theSection);
session().defaultEditingContext().saveChanges();
publication.removeObjectFromBothSidesOfRelationshipWithKey(theSection,
"sectionss");
return null;
}
everything is fine so far.. except if I try to add a
new section object. my app crashes.
this is the top of the error log:
java.lang.IllegalStateException: Cannot obtain
globalId for an object which is not registered in any
editingContextobject: {values = {sectiontrim = ;
sectioncomment = ; sectiontitle = "aaaaaa";
sectionbleed = ; sectionsafety = ; }; this = ""; },
databaseContext:
com.webobjects.eoaccess.EODatabaseContext@e36ec6,
object's editingContext: null, databaseContext's
active editingContext:
com.webobjects.eocontrol.EOEditingContext@f68336
Should I be 'clearing' the editingContext? What am I
missing in the logic of WebObjects?
Ted
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
_______________________________________________
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