#16458: Equality operator on django.db.models.Model not commutative
-------------------------------------+-------------------------------------
Reporter: freek.wiekmeijer@… | Owner: anonymous
Type: Bug | Status: new
Component: Database layer | Version: 1.3
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 1
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
Some discussion about this issue at
https://groups.google.com/forum/#!topic/django-developers/EpUySf_p_Kw. The
branch at https://github.com/akaariai/django/tree/model_eq_proxy contains
somewhat polished patch implementing proxy equality.
I see there is a comment from ORM gurus for implementing the more broad
full inheritance equality in comment:12. There is another patch (though a
little less polished one) at
https://github.com/akaariai/django/tree/model_eq_inherit. I wonder if that
is still wanted? To me it seems there are cases where inheritance equality
is wanted and cases where non-inheritance equality is wanted. The
strongest argument I can make for non-inheritance equality is backwards
compatibility. For one example see the changes to admin_views tests in
model_eq_inherit branch.
--
Ticket URL: <https://code.djangoproject.com/ticket/16458#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/089.76beb17877543389c1823df1c8d71c7d%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.