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
Owns destination confusion
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Owns destination confusion
Subject
:
Owns destination confusion
From: Florijan Stamenkovic <
email@hidden
>
Date: Thu, 28 Feb 2008 12:50:21 -0400
Hi all,
I've setup my "ContactJob" entity to relate to "Numbers" and "Address" entities, and to own the relationships. Both are to-one relationships with foreign keys in ContactJob, that do not have the inverse relationship modeled. From my understanding this should cause new "Numbers" and "Address" EOs to be created, inserted, and related to the "ContactJob" as soon as I create and insert an instance of "ContactJob". Am I wrong?
Coding with the above assumption, I get a NullPointerException thrown when I try to access the relationships. I do this soon after the creation of the "ContactJob", once I set the GUI values on it. I call validateForSave() on the ContactJob, which is overriden to call validateForSave() on the "address" and "numbers" relationships. I need to do this coz Address and Numbers have per EO custom validation rules.
I've triple checked my model. The foreign key to Numbers and Address are set to not null. The relationships are both setup as mandatory, cascading, and owns relationship. The only peculiarity of the situation is that the inverse relationships are not modeled, but I can't see how that matters. I've not overriden awakeFromInsertion() in ContactJob...
Any ideas??? Flor
If this is normal and I just misunderstand, then I suppose I can create and insert the Numbers and Address in ContactJob's awakeFromInsertion(), and relate them, so I guess it's fixable. Still, it does not seem normal to me.
_______________________________________________
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: Owns destination confusion
From:
Johann Werner <email@hidden>
Re: Owns destination confusion
From:
Gary Teter <email@hidden>
Prev by Date:
Re: Application won't stay up, no crash, no log
Next by Date:
Re: Owns destination confusion
Previous by thread:
Re: error when deploy WO WebServices application
Next by thread:
Re: Owns destination confusion
Index(es):
Date
Thread