#25579: Lack of type adaptation in ArrayField querying/lookups
-------------------------------------+-------------------------------------
     Reporter:  freshquiz            |                    Owner:  freshquiz
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  1.8
     Severity:  Normal               |               Resolution:
     Keywords:  ArrayField query     |             Triage Stage:  Accepted
  lookup                             |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by freshquiz):

 With the introduction of this commit:
 
[https://github.com/django/django/commit/2495023a4cae28f494d0a6172abfac3a47a0b816]

 ...I realised that the solution may lie at a higher level.

 The `tests.postgres_tests.models.TagField` class has overridden the
 `get_db_prep_value()` method, with the only change being that it ignores
 the `prepared` keyword-arg and always calls `get_prep_value()` on the
 input value.

 This was introduced because the author of that test code would have
 encountered the type adaptation issue which is what this ticket is about.

 So I can't use the `TagField` class to write tests for a solution to this
 ticket, because the problem is solved by that class.
 I.e. Take away the `TagField`'s overriding implementation of
 `get_db_prep_value()` and the problem of this ticket arises.

--
Ticket URL: <https://code.djangoproject.com/ticket/25579#comment:10>
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/067.340656369167845da7a4c869d3cfc851%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to