|
|
|
|
@ -2624,7 +2624,9 @@ public class MongoTemplate
@@ -2624,7 +2624,9 @@ public class MongoTemplate
|
|
|
|
|
|
|
|
|
|
if (LOGGER.isDebugEnabled()) { |
|
|
|
|
|
|
|
|
|
Document mappedSort = preparer instanceof SortingQueryCursorPreparer sqcp ? getMappedSortObject(sqcp.getSortObject(), sourceClass) : null; |
|
|
|
|
Document mappedSort = preparer instanceof SortingQueryCursorPreparer sqcp |
|
|
|
|
? getMappedSortObject(sqcp.getSortObject(), entity) |
|
|
|
|
: null; |
|
|
|
|
LOGGER.debug(String.format("find using query: %s fields: %s sort: %s for class: %s in collection: %s", |
|
|
|
|
serializeToJsonSafely(mappedQuery), mappedFields, serializeToJsonSafely(mappedSort), sourceClass, |
|
|
|
|
collectionName)); |
|
|
|
|
@ -2993,7 +2995,7 @@ public class MongoTemplate
@@ -2993,7 +2995,7 @@ public class MongoTemplate
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
|
private Document getMappedSortObject(Document sortObject, MongoPersistentEntity<?> entity) { |
|
|
|
|
private Document getMappedSortObject(Document sortObject, @Nullable MongoPersistentEntity<?> entity) { |
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(sortObject)) { |
|
|
|
|
return null; |
|
|
|
|
@ -3355,11 +3357,8 @@ public class MongoTemplate
@@ -3355,11 +3357,8 @@ public class MongoTemplate
|
|
|
|
|
class QueryCursorPreparer implements SortingQueryCursorPreparer { |
|
|
|
|
|
|
|
|
|
private final Query query; |
|
|
|
|
|
|
|
|
|
private final Document sortObject; |
|
|
|
|
|
|
|
|
|
private final int limit; |
|
|
|
|
|
|
|
|
|
private final long skip; |
|
|
|
|
private final @Nullable Class<?> type; |
|
|
|
|
|
|
|
|
|
|