mirror of
https://github.com/django/django.git
synced 2025-08-10 13:58:43 +00:00
[1.8.x] Fixes #24169 -- More arrayfield specific lookups.
varchar()[] cannot compare itself to text[]
Thanks to joelburton for the patch.
Backport of 0ae94d0d31
from master
This commit is contained in:
parent
504cd5d3be
commit
c80b2144d2
2 changed files with 26 additions and 2 deletions
|
@ -156,6 +156,18 @@ class TestQuerying(TestCase):
|
|||
[]
|
||||
)
|
||||
|
||||
def test_contained_by_charfield(self):
|
||||
self.assertSequenceEqual(
|
||||
CharArrayModel.objects.filter(field__contained_by=['text']),
|
||||
[]
|
||||
)
|
||||
|
||||
def test_overlap_charfield(self):
|
||||
self.assertSequenceEqual(
|
||||
CharArrayModel.objects.filter(field__overlap=['text']),
|
||||
[]
|
||||
)
|
||||
|
||||
def test_index(self):
|
||||
self.assertSequenceEqual(
|
||||
NullableIntegerArrayModel.objects.filter(field__0=2),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue