Re: to one relationship not setting foreign key
Re: to one relationship not setting foreign key
- Subject: Re: to one relationship not setting foreign key
- From: Chuck Hill <email@hidden>
- Date: Mon, 02 May 2005 20:42:04 -0700
Did you mark the Client's state relationship as Owns Destination in the
model? If so, EOF is creating a blank State when you create a new client.
Try logging out client().editingContext().insertedObjects() before the call
to saveChanges().
Chuck
At 01:20 PM 03/05/2005 +1000, Greg wrote:
>I have just started to make a small application and have come across
>a problem that won't seem to go away.
>
>I have 2 entities, State and Client, when I create a new client and
>select the state they live in, when I go to save the changes I get
>the following error.
>
>EditClient (EditClient.java:48) -
><er.extensions.ERXValidationException object: <davinci.Client
>pk:"null">; propertyKey: stateID; type: NullPropertyException;
>additionalExceptions: ()>
>
>The state popup's selection property is set to the clients state
>relationship. It is all in a form so I don't know why it is getting
>set as null. All the other properties of form are correct, including
>another to one relationship on the client.
>
>Does anyone have any clues as to why this would be occuring?
>
>Any help is greatly appreciated.
>
>Regards,
>Greg
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Webobjects-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
e.net
>
>This email sent to email@hidden
>
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden