The problem occurs when the remote object does not exist in the table
where the FK points to. In some cases the ORM will generate an `INNER
JOIN` statement instead of a `LEFT OUTER JOIN` causing a row to be wrongly
omitted.
I have made a POC setup for this behaviour on
https://github.com/mhindery/django_fk_issue, with testcases containing
some working lookups, and one specific method that demonstrate the
behaviour. I've included in comments in the tests the query which gets
generated, showing the problematic join.
--
Ticket URL: <https://code.djangoproject.com/ticket/33608>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 4.0 => 3.2
--
Ticket URL: <https://code.djangoproject.com/ticket/33608#comment:1>