|
|
|
|
|
by k4st
4797 days ago
|
|
The SQL generated appears correct, unless the underlying database can guarantee that all foreign key constraints are met. That is, I consider this a failure of the user of the ORM to appreciate that the two invocations of filter are not identical. In the former case, the query is verifying that the object_id field cannot be used to find a foreign object--regardless of the value of object_id. This is exactly what it is asked to do. In the latter case, the query is simply verifying that object_id is NULL, which is exactly what it's asked to do. |
|