Code

Changes between Initial Version and Version 1 of Ticket #11199


Ignore:
Timestamp:
05/25/09 08:34:36 (5 years ago)
Author:
Alex
Comment:

Please use preview.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11199

    • Property Needs documentation unset
    • Property Needs tests unset
    • Property Patch needs improvement unset
  • Ticket #11199 – Description

    initial v1  
    11You have a model like: 
    2  
     2{{{ 
    33class Driver: 
    44    name = models.CharField(max_length=100) 
     
    77    name = models.CharField(max_length=100) 
    88    driver = models.ForeignKey(Driver) 
    9  
     9}}} 
    1010Inside the database mangle the fkey from car to driver as nullable and insert some records into car table without the reference to the driver table. 
    1111 
    1212Than just try: 
     13{{{ 
    1314Car.objects.filter(name = 'something').select_related() 
    14  
     15}}} 
    1516and you will get empty queryset when evaluated. 
    1617