I'm experiencing some weird validation behaviour.
I just generated a DB schema from an old EOModel using WOLips. When I attempt to saveChanges() into a table using some rather vanilla code, I get NullPropertyExceptions for every attribute (even though the attributes all allow nulls in both the model and the DB (except the PK, of course).
I'm using WO 5.4.1, FrontBase, and yesterday's Wonder nightly.
The code:
SWUser u = new SWUser();
someEC.insertObject( user );
someEC.saveChanges();
The error (excerpt, I get one of these for each attribute in the EOM):
<er.extensions.ERXValidationException object: <is.karlmenn.soloweb.data.SWUser pk:"null">; propertyKey: telephone; type: NullPropertyException; additionalExceptions: ( )> )>
The stack trace (below my code):
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:1055)
at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1381)
at er.extensions.ERXGenericRecord.validateForSave(ERXGenericRecord.java:1101)
at com.webobjects.eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1433)
at er.extensions.ERXGenericRecord.validateForInsert(ERXGenericRecord.java:1124)
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)
Look familiar? Would anyone care to shed some light in my direction?
- h