Not able to work around with some iexact queries with Mongo Backend.

13 views
Skip to first unread message

Sajjan K

unread,
Oct 21, 2019, 10:12:28 AM10/21/19
to Django users
Hi Everyone,

I have mongo db in backend. Below is the question details

Model

class Test(models.Model):
    name
= models.CharField(max_length=100)



Now I have saved an object with name='"Random (4) done".


Now If I am making a query:

Test.objects.filter(name__exact="Random (4) done")

In this case I am getting the desired result.

Now if I am making a case insenstive search like this.

Test.objects.filter(name__iexact="Random (4) done")

Then I am not getting any result.

I can't understand why?

Any help would be appricated.

Thanks


Reply all
Reply to author
Forward
0 new messages