@@ -2595,10 +2595,11 @@ protected <S, T> List<T> doFind(String collectionName,
2595
2595
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2596
2596
Document mappedFields = queryContext .getMappedFields (entity , EntityProjection .nonProjecting (entityClass ));
2597
2597
Document mappedQuery = queryContext .getMappedQuery (entity );
2598
+ Document mappedSort = getMappedSortObject (query , entityClass );
2598
2599
2599
2600
if (LOGGER .isDebugEnabled ()) {
2600
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2601
- serializeToJsonSafely (mappedQuery ), mappedFields , entityClass , collectionName ));
2601
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2602
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , entityClass , collectionName ));
2602
2603
}
2603
2604
2604
2605
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2620,10 +2621,11 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
2620
2621
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2621
2622
Document mappedFields = queryContext .getMappedFields (entity , projection );
2622
2623
Document mappedQuery = queryContext .getMappedQuery (entity );
2624
+ Document mappedSort = getMappedSortObject (query , sourceClass );
2623
2625
2624
2626
if (LOGGER .isDebugEnabled ()) {
2625
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2626
- serializeToJsonSafely (mappedQuery ), mappedFields , sourceClass , collectionName ));
2627
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2628
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , sourceClass , collectionName ));
2627
2629
}
2628
2630
2629
2631
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
0 commit comments