Reputation: 1379
When I am executing
ModelName.objects.filter(firstName__contains="MyName")
it returns an empty queryset but when I am executing it's SQL equivalent in dbshell
it is fetching the rows perfectly.
select * from AppName_ModelName where firstName like '%MyName%';
I have constructed the sql query as per the documentation
Upvotes: 1
Views: 120