vert-x3 / vertx-mongo-client

Mongo Client for Eclipse Vert.x
http://vertx.io
Apache License 2.0
58 stars 98 forks source link

Deep handle mongo ID_FIELD when useObjectId #309

Closed liuchong closed 10 months ago

liuchong commented 11 months ago

Motivation:

If we give a query when "_id" field in a nested value like:

{
   "$and":[
      {
         "_id":"an-id-field"
      },
      {
         "some":"other"
      }
   ]
}

then, the nested "_id" will not be encoded. I added a deep version of this method for handling this, we should only need this in query or filter.

Please review this @tsegismont @vietj 👀 If this logic is acceptable, I will complete the test cases, thanks!