Message from discussion
Composite Primary Keys
MIME-Version: 1.0
Received: by 10.100.197.3 with SMTP id u3mr37612anf.6.1219879632447; Wed, 27
Aug 2008 16:27:12 -0700 (PDT)
Date: Wed, 27 Aug 2008 16:27:12 -0700 (PDT)
In-Reply-To: <f470871d0808271527q6e7481aem57151ae1b5d513cf@mail.gmail.com>
X-IP: 163.181.251.9
References: <a23dc28a-3995-419c-bd0b-2a47dccda5dd@a70g2000hsh.googlegroups.com>
<1217200411.2877.34.camel@lancre.tredinick.net> <f470871d0807271618x59911a78ta7afa0b607da08f2@mail.gmail.com>
<b4f139b7-b80c-4b97-bd56-3900dac2bdfc@c65g2000hsa.googlegroups.com>
<4b3ebe7e-31c8-449b-a3ba-843d01e401ae@b1g2000hsg.googlegroups.com>
<1217358024.3007.41.camel@lancre.tredinick.net> <f470871d0807291239m249b8021y8e3c589a23f517a5@mail.gmail.com>
<9c62c940-4415-4e8d-9eeb-347c4148cfab@e53g2000hsa.googlegroups.com>
<f470871d0808271527q6e7481aem57151ae1b5d513cf@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-Via: 1.1 SAUSISA01
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe)
Message-ID: <cb7297cc-3fee-443c-97ba-ee634c261ff5@r66g2000hsg.googlegroups.com>
Subject: Re: Composite Primary Keys
From: Rock <r...@rockhoward.com>
To: Django developers <django-developers@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Well for one thing, if one of the columns happens to be named "ID", we
should use that for the relatedfields lookup column and that is that.
(BTW, does your approach allow the Django supplied ID field to be
combined with some other field(s) to make a multi-column key? This
would be bang up for future partitioning support.)
Next I would suggest adding a meta model column designation like
"id_field" to specify a field to use for related classes. This might
be a good "80/20" solution that could serve for an initial test
version.
On Aug 27, 5:27=A0pm, "David Cramer" <dcra...@gmail.com> wrote:
> Really I'm stuck at an architectural point.
>
> I have database validation and synchronization done, and the admin is
> working.
>
> What is left is more or less handling relatedfield lookups. The issue is,
> that field's are designed to reference more than one field, so it's a tou=
gh
> design deicision to make on how that should be approached.
>