@@ -2587,10 +2587,11 @@ protected <S, T> List<T> doFind(String collectionName,
2587
2587
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2588
2588
Document mappedFields = queryContext .getMappedFields (entity , EntityProjection .nonProjecting (entityClass ));
2589
2589
Document mappedQuery = queryContext .getMappedQuery (entity );
2590
+ Document mappedSort = getMappedSortObject (query , entityClass );
2590
2591
2591
2592
if (LOGGER .isDebugEnabled ()) {
2592
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2593
- serializeToJsonSafely (mappedQuery ), mappedFields , entityClass , collectionName ));
2593
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2594
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , entityClass , collectionName ));
2594
2595
}
2595
2596
2596
2597
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2612,10 +2613,11 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
2612
2613
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2613
2614
Document mappedFields = queryContext .getMappedFields (entity , projection );
2614
2615
Document mappedQuery = queryContext .getMappedQuery (entity );
2616
+ Document mappedSort = getMappedSortObject (query , sourceClass );
2615
2617
2616
2618
if (LOGGER .isDebugEnabled ()) {
2617
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2618
- serializeToJsonSafely (mappedQuery ), mappedFields , sourceClass , collectionName ));
2619
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2620
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , sourceClass , collectionName ));
2619
2621
}
2620
2622
2621
2623
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
0 commit comments