Changes between Initial Version and Version 1 of Ticket #28047


Ignore:
Timestamp:
Apr 7, 2017, 3:45:36 AM (8 years ago)
Author:
Ingo Klöcker
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28047 – Description

    initial v1  
    11I have this (simplified)
    22
     3{{{#!python
    34from django.db import models
     5
    46class Foo(models.Model):
    57    class Meta:
     
    1113        app_label = 'inventory'
    1214    foo = models.OneToOneField(Foo, primary_key=True, on_delete=models.CASCADE)
    13 
     15}}}
    1416
    1517Of course you need an app named inventory. But just use this and try to create a query set like this:
    1618
     19{{{#!python
    1720Bar.objects.filter(foo__in=Foo.objects.all())
     21}}}
    1822
    1923Obviously I had different criteria.
Back to Top