On May 6, 2009, at 1:41 PM, Theodore Petrosky wrote:


This was the winner......

Thank you thank you

of course now I need to understand WHY this works and how to recognize this in the future....


When there's a column set as a class property in the model, EO validation checks it when you try to save. Since you had SubCategoryID set as a non-nullable column it failed validation because you hadn't (and don't need to) set it. I had you remove it as a property because you don't need to deal with the column outside of the relationship.

Make sure you take a look at Guido's advice about organizing your business logic as well...


John




--- On Wed, 5/6/09, John Ours <[email protected]> wrote:

From: John Ours <[email protected]>
Subject: Re: help with a relationship...
To: "Theodore Petrosky" <[email protected]>
Cc: [email protected]
Date: Wednesday, May 6, 2009, 12:34 PM

On May 6, 2009, at 11:08 AM, Theodore Petrosky wrote:


so when I try to save the EO I get an error:

- ValidationException e = Please provide a
<b>Sub CategoryID</b>.


Make sure that SubCategoryID isn't a class property (that
there is not
a small diamond next to it in Entity Modeler).

John







_______________________________________________
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