On May 2, 2008, at 5:37 AM, Hugi Þórðarson wrote:

Thanks Chuck. Some digging in the model and cleanup in the plists solved the problem, and I have *no* idea why. *sigh*.

If it was a very old model, there is a small chance it had some older keys in it that EntityModeler did not recognize.


Sometimes I wish sold books - or grew flowers or something for a living... ;)

Miguel and I talk of starting a farm in Portugal. Interested in joining the "WO Refugees Commune"?


Chuck



On 1.5.2008, at 18:05, Chuck Hill wrote:

My only guess is that the model got corrupted or something even stranger happened. :-) Take a look in .plist file.


Chuck

On May 1, 2008, at 8:38 AM, Hugi Þórðarson wrote:

Good morning folks.

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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [EMAIL PROTECTED]

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
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