can not save to defaultEditingContext
can not save to defaultEditingContext
- Subject: can not save to defaultEditingContext
- From: "Jonathan Fleming" <email@hidden>
- Date: Fri, 07 Feb 2003 17:08:18 +0000
Before the problem, here's the relationship of the entity's: tbAdminUser has
a toMany relationship with >> < tbClient which has a toOne relationship with
tbAdminUser. tbClient goes on to have a oneToOne relationship with
tbClientData and oneToOne back
After logging in as the registered user I make an attempt to create a
new tbClient (account/object/row) and the form loads with the required
setting, but when I submit to save I get this Error
Error: java.lang.IllegalStateException
Reason: Cannot obtain globalId for an object which is not registered in any
editingContext, object: {values = {modificationDate =
<com.webobjects.foundation.NSKeyValueCoding$Null>; clientRefNo =
<com.webobjects.foundation.NSKeyValueCoding$Null>; tbClientData =
"<TbClientData 61dfb5 <EOTemporaryGlobalID: 0 0 -64 -88 0 5 0 0 11 -77 3 0 0
0 0 -13 56 113 104 -1 -10 -55 -6 78>>"; regRenewalReminderDate =
<com.webobjects.foundation.NSKeyValueCoding$Null>; companyName =
<com.webobjects.foundation.NSKeyValueCoding$Null>; addressLine1 =
<com.webobjects.foundation.NSKeyValueCoding$Null>; addressLine2 =
<com.webobjects.foundation.NSKeyValueCoding$Null>; tbCatJoin_tbCategorys =
"null"; artisteName = <com.webobjects.foundation.NSKeyValueCoding$Null>;
lastName = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this =
"<TbClient 36a43c [Gid Not Found]>"; }, databaseContext:
com.webobjects.eoaccess.EODatabaseContext@439a20, object's editingContext:
null, databaseContext's active editingContext:
com.webobjects.eocontrol.EOEditingContext@1e29fb
Stack trace: File Line# Method Package
* these are the hyperlinked messages of the Stack trace
--------------------------------------------------------------------------------
EODatabaseContext.java 4677 _globalIDForObject com.webobjects.eoaccess
EODatabaseContext.java 4780 databaseOperationForObject
com.webobjects.eoaccess
EODatabaseContext.java 6041 recordUpdateForObject com.webobjects.eoaccess
EODatabaseContext.java 4907
relayAttributesInRelationshipSourceObjectDestinationObject
com.webobjects.eoaccess
EODatabaseContext.java 6005 recordChangesInEditingContext
com.webobjects.eoaccess
EOObjectStoreCoordinator.java 393 saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java 2498 saveChanges com.webobjects.eocontrol
*
Tab3UpdateDirectory.java 616 dbAddTbClientToList Tab3UpdateDirectory
KeyValueCodingProtectedAccessor.java 24 methodValue
KeyValueCodingProtectedAccessor
Application.java 374 dispatchRequest Application
this is what I get when I view tbClient in a WOString just before submiting:
{values = {countOfCategories =
<com.webobjects.foundation.NSKeyValueCoding$Null>; clientRefNo =
<com.webobjects.foundation.NSKeyValueCoding$Null>; tbClientData =
"<TbClientData 2ed5f9 <EOTemporaryGlobalID: 0 0 -64 -88 0 5 0 0 11 -77 2 0 0
0 0 -13 56 113 104 -1 -10 -55 -6 78>>"; regRenewalReminderDate =
<com.webobjects.foundation.NSKeyValueCoding$Null>; companyName =
"Not_Required_If_Artiste_Is_Filled_In"; addressLine1 = "22 Testing Field
Road"; addressLine2 = <com.webobjects.foundation.NSKeyValueCoding$Null>;
creationDate = 2003-02-07 13:20:09 Etc/GMT; cellular =
<com.webobjects.foundation.NSKeyValueCoding$Null>; tbAdminUser =
"<TbAdminUser 2452e8 _EOIntegralKeyGlobalID[TbAdminUser
(java.lang.Integer)1]>"; tbCatJoin_tbCategorys = (); artisteName =
"Not_Required_If_Artiste_Is_Filled_In"; lastName = "Required"; }; this =
"<TbClient 56f122 <EOTemporaryGlobalID: 0 0 -64 -88 0 5 0 0 11 -77 1 0 0 0 0
-13 56 113 104 -1 -10 -55 -6 78>>"; }
I believe i am already in the the session().defaultEditingContext() and this
what is in it having used NSLog:
This is what's in the defaultEditingContext()
com.webobjects.eocontrol.EOEditingContext@1e29fb
Setting Category(s) to {values = {categoryName = "Accustics";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
27508a (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)5]>)>"; }; this =
"<TbCategory 7fc686 _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)5]>"; }
Setting Category(s) to {values = {categoryName = "CD Lables";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
18cb3d (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)12]>)>"; }; this =
"<TbCategory 42bece _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)12]>"; }
Setting Category(s) to {values = {categoryName = "DJ"; tbCatJoin_tbClients
= "<com.webobjects.eocontrol._EOCheapCopyMutableArray 472d48
(<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)8]>)>"; }; this =
"<TbCategory 7cfa52 _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)8]>"; }
Setting Category(s) to {values = {categoryName = "HI-FI";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
6df3f6 (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)4]>)>"; }; this =
"<TbCategory 161dff _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)4]>"; }
Setting Category(s) to {values = {categoryName = "Music Photo Library";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
4e3f41 (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)1]>)>"; }; this =
"<TbCategory 7c6e42 _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)1]>"; }
Setting Category(s) to {values = {categoryName = "Music Sales";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
1acd47 (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)2]>)>"; }; this =
"<TbCategory 2af0b3 _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)2]>"; }
Setting Category(s) to {values = {categoryName = "Photography";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
1b04e2 (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)11]>)>"; }; this =
"<TbCategory 2082e2 _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)11]>"; }
Setting Category(s) to {values = {categoryName = "Recording Systems";
tbCatJoin_tbClients = "<com.webobjects.eocontrol._EOCheapCopyMutableArray
5dcec6 (<EOAccessArrayFaultHandler tbCatJoin_tbClients
_EOIntegralKeyGlobalID[TbCategory (java.lang.Integer)7]>)>"; }; this =
"<TbCategory 70c85e _EOIntegralKeyGlobalID[TbCategory
(java.lang.Integer)7]>"; }
What am I obviously not getting right here? Can anyone help correct my
problem?
Jonathan
Ps. I striped out some of the field information because of the post size
restriction, but I'm sure i've left the relvent details.
_________________________________________________________________
Chat online in real time with MSN Messenger http://messenger.msn.co.uk
_______________________________________________
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.