title: Django-queryset join without foreignkey
body: <p>model.py</p>
  
  <pre><code>class Tdzien(models.Model):
    dziens = models.SmallIntegerField(primary_key=True, db_column='DZIENS')
    dzienrok = models.SmallIntegerField(unique=True, db_column='ROK')
  
  
  class Tnogahist(models.Model):
    id_noga = models.ForeignKey(Tenerg, primary_key=True, db_column='ID_ENERG')
    dziens = models.SmallIntegerField(db_column='DZIENS')
  </code></pre>
  
  <p>What I want is to get id_noga where dzienrok=1234. I know that dziens should be</p>
  
  <pre><code>dziens = models.ForeignKey(Tdzien)
  </code></pre>
  
  <p>but it isn't and I can't change that. Normally I would use something like</p>
  
  <pre><code>Tnogahist.objects.filter(dziens__dzienrok=1234)
  </code></pre>
  
  <p>but I don't know how to join and filter those tables without foreignkey.</p>