Changes between Initial Version and Version 1 of Ticket #28047
- Timestamp:
- Apr 7, 2017, 3:45:36 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28047 – Description
initial v1 1 1 I have this (simplified) 2 2 3 {{{#!python 3 4 from django.db import models 5 4 6 class Foo(models.Model): 5 7 class Meta: … … 11 13 app_label = 'inventory' 12 14 foo = models.OneToOneField(Foo, primary_key=True, on_delete=models.CASCADE) 13 15 }}} 14 16 15 17 Of course you need an app named inventory. But just use this and try to create a query set like this: 16 18 19 {{{#!python 17 20 Bar.objects.filter(foo__in=Foo.objects.all()) 21 }}} 18 22 19 23 Obviously I had different criteria.