title: Django model - Foreign Key as Primary Key
body: <p>I have the following 2 tables</p>
  
  <p>In models.py</p>
  
  <pre><code>class Foo(models.Model):
  
      uuid = models.CharField(_('UUID'), primary_key=True, default=uuid4)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class FooExt(models.Model):
  
      uuid = models.ForeignKey(Foo, verbose_name=_('UUID'), primary_key=True)
      time = models.DateTimeField(_('Create DateTime'), auto_now_add=True) 
  </code></pre>
  
  <p>Basically, I have <code>Foo</code> and <code>FooExt</code>. I want a one-to-one relation between <code>FooExt</code>. That's why I set <code>FooExt</code>'s primary key to be foreign key into <code>Foo</code> (not sure if this is the right thing to do).</p>
  
  <p>Now I add an entry into <code>Foo</code>. Does an entry for <code>FooExt</code> automatically get created? Or do I need to manually add an entry to both <code>Foo</code> and <code>FooExt</code>? </p>
  
  <p>Is there anything I can do to get the "automatic" add feature? Conceptually, these 2 tables describe the same thing, but I just don't want to pollute <code>Foo</code> with extra information. So it'd be great if an add to <code>Foo</code> automatically creates a corresponding <code>FooExt</code>. </p>