If you decode the cursor you will see a dictionary with some parameters, like last_doc, limit, filters if you used, and order. But if you look at the order closely, it will generate order="created_time" not "-created_time". And this causes problems with next fetch.
I wrote an function to correct the cursor in my project, but maybe it will be much safer when we fix this issue inside fireo package.
When you generate cursor from collection with descending ordering, the generated cursor consists with ascending ordering.
For example, let's consider we have Comment collection with some fields and "created_time" field as DateTime.
collection = Comment.collection.order("-created_time").fetch(5)
comments = list(collection)
cursor = collection.cursor
If you decode the cursor you will see a dictionary with some parameters, like last_doc, limit, filters if you used, and order. But if you look at the order closely, it will generate order="created_time" not "-created_time". And this causes problems with next fetch.
I wrote an function to correct the cursor in my project, but maybe it will be much safer when we fix this issue inside fireo package.