#29145: CIText and __eq__
--------------------------------+--------------------------------------
     Reporter:  Дилян Палаузов  |                    Owner:  nobody
         Type:  Uncategorized   |                   Status:  new
    Component:  Uncategorized   |                  Version:  2.0
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by Дилян Палаузов):

 I am not talking about model equality, but about a field equality.

 The use case is a list of models-instances without IDs and the list can
 contain the same instance several times.  I want to send a single SELECT
 and assign IDs to all objects in the list.

 However, the list can contains twice the same object while the SELECT will
 return the object only once.  Moreover the objects are returned in any
 order.  So the result of SELECT needs to be matched with the objects from
 the list, comparing field-by-field of what was requested if it matches the
 currently processed row.  For this matching to work universally with == in
 case CICharField fields 'a' == 'A' must also match.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29145#comment:2>
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/072.4c7090f9940457c67dfbdcef75005249%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to