Immutables Criteria for MongoDB seems to have a bug, when you try to find a document with an element inside a nested collection that matches multiple conditions. For example:
person.pets.any()
.with(pet -> pet.name.is("fluffy").and(pet.type.is(Pet.PetType.gecko)))
Executing such a criterion against an in-memory backend works.
However, running such a criterion against a mongo backend fails with an error like:
ImmutableCall{EQUAL path=getName constant=fluffy} is not a path
java.lang.IllegalArgumentException: ImmutableCall{EQUAL path=getName constant=fluffy} is not a path
Immutables Criteria for MongoDB seems to have a bug, when you try to find a document with an element inside a nested collection that matches multiple conditions. For example:
Executing such a criterion against an in-memory backend works.
However, running such a criterion against a mongo backend fails with an error like: