An application that I have converted from XCode to Eclipse is throwing an error when I save a new document EO. I went back in and looked at the old version of the model in the XCode app and the relationship is marked as to-one optional. The entity modeler version is mandatory to-one and if I try to set it back to optional, it gives me a warning: "The relationship documentContent is optional but the attribute id does not allow nulls". What do I need to do to model this correctly and/or get rid of the error on save?
David
Jan 06 08:54:33 CARRFS_P2P[49429] (ERXNSLogLog4jBridge.java:43) WARN NSLog - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: <er.extensions.validation.ERXValidationException object: <ca.cscw.carrfs_p2pmodel.Document pk:"null">; propertyKey: documentContent; type: MandatoryToOneRelationshipException; additionalExceptions: ()> [2009-01-06 08:54:33 PST] <WorkerThread1> <er.extensions.validation.ERXValidationException object: <ca.cscw.carrfs_p2pmodel.Document pk:"null">; propertyKey: documentContent; type: MandatoryToOneRelationshipException; additionalExceptions: ()> at com.webobjects.eoaccess.EORelationship.validateValue(EORelationship.java:1805) at com.webobjects.eoaccess.EOEntityClassDescription.validateValueForKey(EOEntityClassDescription.java:443) at er.extensions.eof.ERXEntityClassDescription.validateValueForKey(ERXEntityClassDescription.java:807) at com.webobjects.eocontrol.EOCustomObject.validateValueForKey(EOCustomObject.java:1339) at er.extensions.eof.ERXGenericRecord.validateValueForKey(ERXGenericRecord.java:1079) at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1411) at er.extensions.eof.ERXGenericRecord.validateForSave(ERXGenericRecord.java:1125) at com.webobjects.eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1473) at er.extensions.eof.ERXGenericRecord.validateForInsert(ERXGenericRecord.java:1148) at com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingContext.java:2249) at com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEditingContext.java:3029) at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditingContext.java:3283) at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3213) at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981) at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903) at ca.cscw.carrfs_p2p.AttachMeetingDocument.toAttachMeetingDocument(AttachMeetingDocument.java:130) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:684) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46) at com.webobjects.appserver.WOComponent.valueForBinding(WOComponent.java:735) at com.uploadsuite.NBUploadWithProgress.finalAction(NBUploadWithProgress.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:684) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46) at com.webobjects.appserver._private.WOGenericElement.invokeAction(WOGenericElement.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:180) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:104) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:31) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:31) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at er.extensions.components.conditionals.ERXWOConditional.invokeChildrenAction(ERXWOConditional.java:111) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at er.extensions.components.conditionals.ERXWOConditional.invokeAction(ERXWOConditional.java:102) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:104) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:104) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945) at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1168) at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1375) at er.extensions.appserver.ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:49) at er.extensions.appserver.ERXApplication.invokeAction(ERXApplication.java:1539) at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:196) at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:287) at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:322) at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:358) at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:432) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1654) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1619) at com.uploadsuite.NBUploadAction.finalResponse(NBUploadAction.java:355) at com.uploadsuite.NBUploadAction.performAction(NBUploadAction.java:116) at com.uploadsuite.NBURequestHandler.handleRequest(NBURequestHandler.java:47) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1654) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1619) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254) at java.lang.Thread.run(Thread.java:613)
|