title: Django foreign keys cascade deleting and "related_name" parameter (bug?)
body: <p>In <a href="https://stackoverflow.com/questions/1006135/how-do-i-create-a-django-model-with-foreignkeys-which-does-not-cascade-deletes-to">this topic</a> I found a good way to prevent cascade deleting of relating objects, when it's not neccessary. </p>
  
  <pre><code>class Factures(models.Model):
      idFacture = models.IntegerField(primary_key=True)
      idLettrage = models.ForeignKey('Lettrage', db_column='idLettrage', null=True, blank=True)
  
  class Paiements(models.Model):
     idPaiement = models.IntegerField(primary_key=True)
     idLettrage = models.ForeignKey('Lettrage', db_column='idLettrage', null=True, blank=True)
  
  class Lettrage(models.Model):
     idLettrage = models.IntegerField(primary_key=True)
  
     def delete(self):
        """Dettaches factures and paiements from current lettre before deleting"""
        self.factures_set.clear()
        self.paiements_set.clear()
        super(Lettrage, self).delete()
  </code></pre>
  
  <p>But this method seems to fail when we are using ForeignKey field with "related_name" parameter.
  As it seems to me, "clear()" method works fine and saves the instance of "deassociated" object. But then, while deleting, django uses another memorized copy of this very object and since it's still associated with object we are trying to delete - whooooosh! ...bye-bye to relatives :)</p>
  
  <p>Database was arcitectured before me, and in somewhat odd way, so I can't escape these "related_names" in reasonable amount of time. Anybody heard about workaround for such a trouble?</p>