You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using MongoTemplate.find(...) order of the nested fields is not preserved. This might be problematic if full objects search is used (for example for indexed complex fields).
Below you can find JUnit with this issue highlighted.
Failing as query for Mongodb is:
{ "nested" : { "checkName" : "B", "checkVersion" : "1", "systemName" : "A" } }
instead of
{ "nested" : { "systemName" : "A", "checkName" : "B", "checkVersion" : "1" } }
on MongoTemplate.doFind() on line: Document mappedQuery = queryContext.getMappedQuery(entity);
When using MongoTemplate.find(...) order of the nested fields is not preserved. This might be problematic if full objects search is used (for example for indexed complex fields).
Below you can find JUnit with this issue highlighted.
Failing as query for Mongodb is:
{ "nested" : { "checkName" : "B", "checkVersion" : "1", "systemName" : "A" } }
instead of
{ "nested" : { "systemName" : "A", "checkName" : "B", "checkVersion" : "1" } }
on MongoTemplate.doFind() on line: Document mappedQuery = queryContext.getMappedQuery(entity);
https://github.com/infoShare/code-examples/blob/main/spring-data-mongodb-order/src/test/java/infoshare/springdatamongodborder/SpringDataMongodbOrderTests.java
It is working properly on spring-data-mongodb:4.1.5
The text was updated successfully, but these errors were encountered: