micronaut-data icon indicating copy to clipboard operation
micronaut-data copied to clipboard

mongo findByIdIn filter generate error

Open YoKv opened this issue 3 years ago • 0 comments

Expected Behavior

Executing Mongo 'find' with filter: {"_id": {"$in": [{"$oid": "63195a53e0d5e508b7cadc7e"}]}, "del": false}

Actual Behaviour

Executing Mongo 'find' with filter: {"id": {"$in": [{"$oid": "63195a53e0d5e508b7cadc7e"}]}, "del": false}

Expected "_id" Actual "id"

Steps To Reproduce

micronaut 3.6.2 micronaut-data-mongodb 3.7.3 mongodb-driver-sync


@Data
public class Foo implements Serializable {
    @Id
    @GeneratedValue
    private ObjectId id;

    private Boolean del = false;

}


@MongoRepository
public interface FooRepository extends CrudRepository<Foo, ObjectId> {
    List<Foo> findByIdInAndDelFalse(List<ObjectId> ids);
}

Environment Information

No response

Example Application

No response

Version

3.7.3

YoKv avatar Sep 08 '22 03:09 YoKv