Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey
Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey
- Subject: Re: D2W does not do addObjectToBothSidesOfRelationshipWithKey
- From: Alexander Spohr <email@hidden>
- Date: Thu, 12 Jul 2007 23:19:24 +0200
Am 12.07.2007 um 22:56 schrieb Johan Henselmans:
On 12-jul-2007, at 21:58, Robert Walker wrote:
Johan,
Is this truly a one-to-one relationship as modeled? I mean are
the tables joined PK <----> PK? Or is this modeled as a one-to-
many with the many-side limited to one related object in the array?
it is like:
a-pk<--b-fk
a-fk --> b-pk
So the foreign key of table a points to the primary key of b and
vice versa, so one can find a via b and find b via a.
If this is a true PK to PK one-to-one relationship, which way have
you set "Propagates Primary Key?" If it's a true one-to-one it's
that property of the model that is responsible to setting the
destination PK.
I think we're not talking about the same type of relationships. Bot
tables exist, they can not have one of the primary keys propagated,
as it is not know beforehand which one of the records will relate
to which record in the other table.
Then it is not a true 1:1 as one a may have many b’s and one b may
have many a’s. Thats what Robert meant by not being a true 1:1.
If you join a PK to an FK you always have a 1:n
Anyway, D2W should always call
addObjectToBothSidesOfRelationshipWithKey. If it does not, it has a bug.
atze
_______________________________________________
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