Re: compound pk
Re: compound pk
- Subject: Re: compound pk
- From: John Bruce <email@hidden>
- Date: Tue, 10 Nov 2009 16:07:28 +0000
Hi Mike,
Had a situation recently on a app where some entities were using
compound primary keys. Most of the time they were read only but there
was a new process added that duplicated some of these entities (using
EOCopying). In that case some values in the compound primary key
needed to stay the same and others would be different (some had 3
attributes as part of the key). Before refactoring these entites we
would do the copy and specify the primary key dictionary in the entiy
retaining the fixed attributes and use generated values for the
changable ones. It worked most of the time but in the end we just
changed those entities to use single primary keys in the more standard
way. So I guess my point is that automatic compound primary key
generation could be useful when duplicating objects that use them.
Also if you arn't in a position to alter the db schema then you might
not be able to change to single primary keys and being able to insert
objects in that situation would be nice without having the manually
create the ok dictionary.
Cheers,
John
On Tue, Nov 10, 2009 at 3:43 PM, Mike Schrag <email@hidden> wrote:
> has anyone ever had a scenario where they've had an entity with a compound
> PK where they needed PK generation for some strange reason? i can't come up
> with any scenario where this would actually work, but i thought i'd toss the
> question out to the masses ....
>
> ms
>
> _______________________________________________
> 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
References: | |
| >compound pk (From: Mike Schrag <email@hidden>) |