title: Create a per-master-object id for each object belogning to a master object
body: <p>If we supose that we have the following model:</p>
  
  <pre><code>class MainModel(models.Model):
      name = models.charField(max_length=30)
  
  class SecondModel(models.Model):
      name = models.charField(max_length=30)
      mainmodel = models.ForeignKey(MainModel)
  
      class Meta:
          unique_together(("mainmodel","id"))
  </code></pre>
  
  <p>I would like to have id-s for the SecondModel like this:</p>
  
  <pre><code>mainmodel: 1
  id: 1
  
  mainmodel: 1
  id: 2
  
  mainmodel: 2
  id: 1
  
  mainmodel: 2
  id: 2
  </code></pre>
  
  <p>And what I get is the following:</p>
  
  <pre><code>mainmodel: 1
  id: 1
  
  mainmodel: 1
  id: 2
  
  mainmodel: 2
  id: 3
  
  mainmodel: 2
  id: 4  
  </code></pre>
  
  <p>Any ideas?</p>