Closed aschmalfeld closed 10 months ago
@aschmalfeld thanks for reporting - guess that will require some digging where things go off route.
looks like this is a side effect of #4555. The current PR #4568 will fix the ordering aspect as well.
That's fixed now.
In my class which extends from MongoRepository I have a method
where myCategories are e.g.:
When inserted into the Mongodb the order of key value pairs is as expected from a TreeMap, but when I call the method findByMyCategories(myCategories) the mongoDB logs suggest the wrong order was used and therefore the object was not found.
This always returns the correct results for only one key value pair, for multiple pairs it is always wrong for some pairs and always correct for others as if it is following some pattern.
It worked correctly before the update of
spring-data-mongodb
from 4.1.6 to 4.2.0A workaround is to annotate the method with
@Query
or@Aggregation
.