Hello,
I can't get past NullPropertyException's when I try to save changes to my editing context. I have an object, pool, that I add an entry to with the Entry.createEntry operation. Then, in turn, I add an EntryScore obejct to the entry object. Note that the entryScore relationship in Entry (the one causing the problems) is set to "propagate primary key". I have tried making it both mandatory and optional with the same results. Any ideas what may be causing this?

Here's the basic code:

   EOQualifier poolQual = Pool.NAME.eq(name);
   pool = Pool.fetchRequiredPool(ec, poolQual);
entry = Entry.createEntry(ec, "DEFAULT", "pw", true, false, new Integer(0), "", false, false, false, new Integer(0), pool, user);
   EntryScore es = EntryScore.createEntryScore(ec, 0, 0, 0, 0, 0, 0);
   entry.setEntryScore(es);
   ec.saveChanges();

exception (on the SaveChanges line):

Jun 01 21:19:54 netBrackets[64375] (ERXNSLogLog4jBridge.java:41) WARN NSLog - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numSecs; type: NullPropertyException; additionalExceptions: ( <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numThirds; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numWins; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: place; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: points; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: potential; type: NullPropertyException; additionalExceptions: ( )> )> [2008-6-2 3:19:54 CDT] <WorkerThread0> <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numSecs; type: NullPropertyException; additionalExceptions: ( <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numThirds; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: numWins; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: place; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: points; type: NullPropertyException; additionalExceptions: ( )>, <er.extensions.ERXValidationException object: <com.netbracketsfw.model.EntryScore pk:"null">; propertyKey: potential; type: NullPropertyException; additionalExceptions: ( )> )> at com.webobjects.eoaccess.EOAttribute.validateValue(EOAttribute.java: 2541) at com .webobjects .eoaccess .EOEntityClassDescription .validateValueForKey(EOEntityClassDescription.java:452) at er .extensions .ERXEntityClassDescription .validateValueForKey(ERXEntityClassDescription.java:796) at com .webobjects .eocontrol.EOCustomObject.validateValueForKey(EOCustomObject.java:1311) at er .extensions.ERXGenericRecord.validateValueForKey(ERXGenericRecord.java: 1063) at com .webobjects .eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1381) at er.extensions.ERXGenericRecord.validateForSave(ERXGenericRecord.java: 1109) at com .webobjects .eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1433) at er.extensions.ERXGenericRecord.validateForInsert(ERXGenericRecord.java: 1132) at com .webobjects .eocontrol.EOEditingContext.validateTable(EOEditingContext.java:2265) at com .webobjects .eocontrol .EOEditingContext.validateChangesForSave(EOEditingContext.java:2991) at com .webobjects .eocontrol .EOEditingContext._prepareForPushChanges(EOEditingContext.java:3233) at com .webobjects .eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3163)
        at er.extensions.ERXEC._saveChanges(ERXEC.java:937)
        at er.extensions.ERXEC.saveChanges(ERXEC.java:860)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to