@@ -2551,10 +2551,11 @@ protected <S, T> List<T> doFind(String collectionName,
2551
2551
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2552
2552
Document mappedFields = queryContext .getMappedFields (entity , EntityProjection .nonProjecting (entityClass ));
2553
2553
Document mappedQuery = queryContext .getMappedQuery (entity );
2554
+ Document mappedSort = getMappedSortObject (query , entityClass );
2554
2555
2555
2556
if (LOGGER .isDebugEnabled ()) {
2556
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2557
- serializeToJsonSafely (mappedQuery ), mappedFields , entityClass , collectionName ));
2557
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2558
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , entityClass , collectionName ));
2558
2559
}
2559
2560
2560
2561
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2576,10 +2577,11 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
2576
2577
QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
2577
2578
Document mappedFields = queryContext .getMappedFields (entity , projection );
2578
2579
Document mappedQuery = queryContext .getMappedQuery (entity );
2580
+ Document mappedSort = getMappedSortObject (query , sourceClass );
2579
2581
2580
2582
if (LOGGER .isDebugEnabled ()) {
2581
- LOGGER .debug (String .format ("find using query: %s fields: %s for class: %s in collection: %s" ,
2582
- serializeToJsonSafely (mappedQuery ), mappedFields , sourceClass , collectionName ));
2583
+ LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2584
+ serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , sourceClass , collectionName ));
2583
2585
}
2584
2586
2585
2587
return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
0 commit comments