Fwd: Null property exceptions
Fwd: Null property exceptions
- Subject: Fwd: Null property exceptions
- From: Jeff Schmitz <email@hidden>
- Date: Tue, 3 Jun 2008 12:33:22 -0700
The below explanation really helped me get over the hump on implementing a 1 to 1 relationship, so thought I'd forward it to the list for use by future neophytes like myself. Now that I see it, it makes perfect sense, but when it's all an unknown, interpreting all the possible inputs correctly can be a challenge.
Begin forwarded message: Date: June 3, 2008 7:39:07 AM PDT (CA) Subject: Re: Null property exceptions
Hi Jeff,
I think you can't really make that sort of relationship out of the box with Entity Modeler. First you would uncheck both check boxes in the EntryScore part and in the Entry part select "to one" and check only the first check box. The dialog box will then show you a part Joins where you select for both entities to connect the id attribute (assuming both attributes exist already).
After clicking OK select the relationship and change the following options on the properties tab:
Delete Rule should be set to Cascade Check Owns Destination Check Propagates Primary Key
That should do it.
jw
Am 03.06.2008 um 16:21 schrieb Jeff Schmitz:
Hi Johann,
would it be possible for you to "spoon feed" me through this? I've tried many combinations of setting these things but always get errors from EoModeler. If you could help, first, what selections do I need to make on the Create Relationship screen? Note that it is impossible to select "to one" on both ends of the relationship here:
<create.tiff>
On Jun 3, 2008, at 7:06 AM, Johann Werner wrote:
By looking at your Entity Modeler screenshot again your relationship from Entry to EntryScore should have "id" as source attribute and not your entryScoreID (finally you want your PK to be propagated). Changing this you should not have any warnings when deleting entryScoreID.
jw
Am 03.06.2008 um 15:32 schrieb Jeff Schmitz:
When I try to delete the foreign key, I get a big error message:
<error.jpg>
If the relationship is setup as a "propagate primary key", why should the relationship be referencing it?
Then, when I select Delete Anyway, it deletes both the foreign key AND the relationship. Now what?
Thanks,
Jeff
|
_______________________________________________
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