BraintagsGmbH/vertx-pojo-mapper

How to query by ObjectId

andybuit opened this issue · 1 comments

I have a mongodb collection with ObjectId .
I tried to query it as
query.field(query.getMapper().getIdField().getName()).is(new ObjectId(id));

But I can not get the result.

did you try
query.field(query.getMapper().getIdField().getName()).is( id );