Re: Propagate Primary Key Confusion?
Re: Propagate Primary Key Confusion?
- Subject: Re: Propagate Primary Key Confusion?
- From: Kieran Kelleher <email@hidden>
- Date: Mon, 17 Jan 2005 11:37:35 -0500
Thanks Chuck and Art,
I completely misunderstood "Owns Destination" after seeing its
explanation on page .... working good now. I have another question on
Owns Destination:
Let's say I have a Customer object who always has an Address object.
Now there are other types of objects (Store Location, Salesperson,
Consumer, etc.) that also have various types of relationships to
address objects. Given that other things may have address objects,
would it be proper to set "Owns Destination" on the Customer.address
relationship for the purpose of automatically creating and relating an
address for new Customer objects?
Regards, Kieran
On Jan 16, 2005, at 11:13 PM, Chuck Hill wrote:
Actually, its Owns Destination confusion. :-) Owns Destination means
that
the two objects can't exist in isolation. When object A is created,
EOF
creates an instance of Object B for you. This happens during
awakeFromInsertion. Very useful in some situations, but not here. For
your
purposes, what you want is Delete Rule: Cascade, which you already
have.
Chuck
At 09:05 PM 16/01/2005 -0500, Kieran Kelleher wrote:
I have a account entity with a to-one relationship to ccInformation
joined on both primary keys.
I have modeled the account.ccInformation relationship as:
Optionality: Optional
Delete Rule: Cascade
Propagate Primary Key checked
Owns Destination checked
When I create an account EO, a ccInformation EO is AUTOMATICALLY
created! I don't want this to happen .... it's optional! Is this
supposed to happen?
So, for "optional to one" is my only choice a foreign key in account
pointing to ccInformation?
-Kieran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
villag
e.net
This email sent to email@hidden
--
Chuck Hill email@hidden
Global Village Consulting Inc.
http://www.global-village.net
___________________________________
Kieran Kelleher
SmartleadsUSA,LLC
2656 West Lake Rd
Palm Harbor, FL 34684
email@hidden
727-785-0766 x33
_______________________________________________
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