Bug on LIMIT - OFFSET queries
This type of queries are buggy.
Problem is so weird. I can explain it with images. It happened in my pagination part. Firs I tried to find the problem on template, but it is rising from djongo I guess. Here is the debug pictures of my 2 projects. While sqlite there is no problem with the queries, when using mongodb with djongo there are problems with queries. self.object_list is a django pagination object. There are 3 objects in both 2 examples.
First while using sqlite,
-
There are completely 3 objects in sqlite db.

-
When queries [2:3], it returns one object as we expected.

Second while using MongoDB with Djongo,
-
There are completly 3 objects in MongoDb.

-
When queries [2:3], it returns en empty query list.

No trace back info about it.
Facing same issue :(
p = Profile.objects.filter(user__is_superuser=False) p.count() 16 p <QuerySet [<Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >]> p[0:10] <QuerySet [<Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >, <Profile: >]> p[10:12] <QuerySet []> p[8:12] <QuerySet []> Please let me know do you find any solution on this . Thanks
Actually it was the poc for me then I didn't use djongo even mongo after this problem. Continued with the sqlite for poc.
Oh thanks for the reply :) I am stuck with this issue in the 2nd phase of the project, cant rework on models :( . I am facing issue only when using filter with a foreignkey relation model field.
This is fixed