Message from discussion
Composite Primary Keys
Received: by 10.114.25.19 with SMTP id 19mr990313way.22.1219971944721;
Thu, 28 Aug 2008 18:05:44 -0700 (PDT)
Return-Path: <dcra...@gmail.com>
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228])
by mx.google.com with ESMTP id k19si1473254waf.2.2008.08.28.18.05.43;
Thu, 28 Aug 2008 18:05:44 -0700 (PDT)
Received-SPF: pass (google.com: domain of dcra...@gmail.com designates 209.85.198.228 as permitted sender) client-ip=209.85.198.228;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of dcra...@gmail.com designates 209.85.198.228 as permitted sender) smtp.mail=dcra...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by rv-out-0506.google.com with SMTP id b25so571916rvf.49
for <django-developers@googlegroups.com>; Thu, 28 Aug 2008 18:05:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:in-reply-to:mime-version:content-type:references;
bh=W2/rD7DNzU8aIGu4cMhkMZVwDgvJXboM6rKdSqDt6O8=;
b=pWxsHEFpLfwOJCe/Py4GJgS82n0Sy8/4+UC5ED9vese/RrQStyIitZCf9wYUUNx3Ss
K0PiEVVYeP1NMdL1sfZYOoL/ToeqF5IfP8gEg2GL4E0WXaMU3LSNk7j+83gRe366N53A
01c/+N4M3PWBE6PD8wBNI7zRmPLLbmHN7g6dc=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:in-reply-to:mime-version
:content-type:references;
b=kkw7e8ewAdKvJMIxJ8WXNRLxOrxQ0v9Z2eZhZjyZYs8AYag9DcrWtkPoyXtv3mt/kN
/UYUwCLDzVdRqeH/DEk0ukoiltNWjOMDeoJhPcWEbMczsrEhgte0BL6dHCOhTMWdgXZT
hzDacz0d/RvZMPLA6F+NlJdERbL2jaLVeNkZY=
Received: by 10.141.203.7 with SMTP id f7mr1161836rvq.7.1219971943586;
Thu, 28 Aug 2008 18:05:43 -0700 (PDT)
Received: by 10.140.142.12 with HTTP; Thu, 28 Aug 2008 18:05:43 -0700 (PDT)
Message-ID: <f470871d0808281805haddf69axec14fa422ed14962@mail.gmail.com>
Date: Thu, 28 Aug 2008 20:05:43 -0500
From: "David Cramer" <dcra...@gmail.com>
To: django-developers@googlegroups.com
Subject: Re: Composite Primary Keys
In-Reply-To: <0b546667-e65a-45b5-8617-dc4183981...@z72g2000hsb.googlegroups.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_14976_24979912.1219971943578"
References: <a23dc28a-3995-419c-bd0b-2a47dccda...@a70g2000hsh.googlegroups.com>
<b4f139b7-b80c-4b97-bd56-3900dac2b...@c65g2000hsa.googlegroups.com>
<4b3ebe7e-31c8-449b-a3ba-843d01e40...@b1g2000hsg.googlegroups.com>
<1217358024.3007.41.ca...@lancre.tredinick.net>
<f470871d0807291239m249b8021y8e3c589a23f51...@mail.gmail.com>
<9c62c940-4415-4e8d-9eeb-347c4148c...@e53g2000hsa.googlegroups.com>
<f470871d0808271527q6e7481aem57151ae1b5d51...@mail.gmail.com>
<cb7297cc-3fee-443c-97ba-ee634c261...@r66g2000hsg.googlegroups.com>
<fe20d9d6-c549-4eb3-bc2e-7ce84a261...@k13g2000hse.googlegroups.com>
<0b546667-e65a-45b5-8617-dc4183981...@z72g2000hsb.googlegroups.com>
------=_Part_14976_24979912.1219971943578
Content-Type: text/plain; charset=ISO-8859-1
I'm not quite sure how that relates to Composite Primary Keys?
A ForeignKey would point to multiple internal fields, but it should look
like it's a single field. At the same time, this would open up the
possibility for Composite Foreign Keys, which would mean it could point to
multiple public fields.
On Thu, Aug 28, 2008 at 5:36 PM, Rock <r...@rockhoward.com> wrote:
>
> To be clear, the syntax is:
>
> myfkey = models.ForeignKey(SomeClass,to_field="id")
>
>
> >
>
--
David Cramer
Director of Technology
iBegin
http://www.ibegin.com/
------=_Part_14976_24979912.1219971943578
Content-Type: text/html; charset=ISO-8859-1
<div dir="ltr">I'm not quite sure how that relates to Composite Primary Keys?<br><br>A ForeignKey would point to multiple internal fields, but it should look like it's a single field. At the same time, this would open up the possibility for Composite Foreign Keys, which would mean it could point to multiple public fields.<br>
<br><div class="gmail_quote">On Thu, Aug 28, 2008 at 5:36 PM, Rock <span dir="ltr"><<a href="mailto:r...@rockhoward.com">r...@rockhoward.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
To be clear, the syntax is:<br>
<br>
myfkey = models.ForeignKey(SomeClass,to_field="id")<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Cramer<br>Director of Technology<br>iBegin<br><a href="http://www.ibegin.com/">http://www.ibegin.com/</a><br>
</div>
------=_Part_14976_24979912.1219971943578--