• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: to one relationship not setting foreign key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to one relationship not setting foreign key


  • Subject: Re: to one relationship not setting foreign key
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Tue, 3 May 2005 12:36:40 +0200

Could it be that you exposed the foreign key that you use for the relationship (stateID)? I think that if you do that and do not set it up by hand, you end up with a null pointer exception for the key.


On May 03, 2005, at 06:27, Greg wrote:

Hi Chuck,
The state relationship is not checked to Owns Destination. I logged the insertedObjects and it only contains the client.


Any clues?

Greg

On 03/05/2005, at 1:42 PM, Chuck Hill wrote:

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:
chill@global-villag


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

_______________________________________________ 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
  • Follow-Ups:
    • Re: to one relationship not setting foreign key
      • From: Chuck Hill <email@hidden>
References: 
 >Re: to one relationship not setting foreign key (From: Chuck Hill <email@hidden>)
 >Re: to one relationship not setting foreign key (From: Greg <email@hidden>)

  • Prev by Date: Re: 5.2.4 API Documetation pulled?
  • Next by Date: Re: An EO custom java can't be made with Tiger.
  • Previous by thread: Re: to one relationship not setting foreign key
  • Next by thread: Re: to one relationship not setting foreign key
  • Index(es):
    • Date
    • Thread