@@ -2595,10 +2595,11 @@ protected <S, T> List<T> doFind(String collectionName,
25952595 QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
25962596 Document mappedFields = queryContext .getMappedFields (entity , EntityProjection .nonProjecting (entityClass ));
25972597 Document mappedQuery = queryContext .getMappedQuery (entity );
2598+ Document mappedSort = getMappedSortObject (query , entityClass );
25982599
25992600 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 ));
26022603 }
26032604
26042605 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2620,10 +2621,11 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
26202621 QueryContext queryContext = queryOperations .createQueryContext (new BasicQuery (query , fields ));
26212622 Document mappedFields = queryContext .getMappedFields (entity , projection );
26222623 Document mappedQuery = queryContext .getMappedQuery (entity );
2624+ Document mappedSort = getMappedSortObject (query , sourceClass );
26232625
26242626 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 ));
26272629 }
26282630
26292631 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
0 commit comments