Closed brodeuralexis closed 7 years ago
simply invert the order of $gt and $oid
GET /data-cache/test?filter={"_id": { "$gt": { "$oid": "57fd2d37c9e77c0007e48008" } }}&pagesize=10
This works, thank you.
I'll be leaving this link here for reference : https://docs.mongodb.com/manual/reference/mongodb-extended-json/#data_oid
I am trying to implement Seek Pagination for a client using the document's autogenerated
_id
s.This is the request I initially tried :
Alas, it returns a
400
with ajava.lang.ClassCastException
.After digging through the source code, I understand that a
BsonDocument
is created from thefilter
query parameter and then sent to MongoDB directly.What I need is a way to specifie that a key in my
filter
property is anObjectId
like adding a query parameter (oid
in this example) :Logic to cover this use case could be added to the
RequestContext.getFiltersDocument
method.If such a change is out of scope, I will simply have to fall back to the native MongoDB driver.