mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
0c71e0f9cf
In Query.join() the argument reuse_with_filtered_relation was used to
determine whether to use == or .equals(). As this area of code is
related to aliases, we only expect an instance of Join or BaseTable to
be provided - the only two classes that provide .equals().
In both cases, the implementations of __eq__() and equals() are based
on use of the "identity" property. __eq__() performs an isinstance()
check first, returning NotImplemented if required. BaseTable.equals()
then does a straightforward equality check on "identity". Join.equals()
is a little bit different as it skips checking the last element of the
"identity" property: filtered_relation. This was only included
previously when the with_filtered_relation argument was True, impossible
since
|
||
---|---|---|
.. | ||
apps | ||
conf | ||
contrib | ||
core | ||
db | ||
dispatch | ||
forms | ||
http | ||
middleware | ||
template | ||
templatetags | ||
test | ||
urls | ||
utils | ||
views | ||
__init__.py | ||
__main__.py | ||
shortcuts.py |