|
|
|
|
@ -36,7 +36,6 @@ import org.springframework.data.geo.GeoResults;
@@ -36,7 +36,6 @@ import org.springframework.data.geo.GeoResults;
|
|
|
|
|
import org.springframework.data.geo.Point; |
|
|
|
|
import org.springframework.data.geo.Polygon; |
|
|
|
|
import org.springframework.data.mongodb.core.aggregation.AggregationResults; |
|
|
|
|
import org.springframework.data.mongodb.core.mapping.Document; |
|
|
|
|
import org.springframework.data.mongodb.repository.Person.Sex; |
|
|
|
|
import org.springframework.data.querydsl.QuerydslPredicateExecutor; |
|
|
|
|
import org.springframework.data.repository.query.Param; |
|
|
|
|
@ -362,7 +361,8 @@ public interface PersonRepository extends MongoRepository<Person, String>, Query
@@ -362,7 +361,8 @@ public interface PersonRepository extends MongoRepository<Person, String>, Query
|
|
|
|
|
@Query(value = "{ 'id' : ?0 }", fields = "{ 'fans': { '$slice': [ ?1, ?2 ] } }") |
|
|
|
|
Person findWithSliceInProjection(String id, int skip, int limit); |
|
|
|
|
|
|
|
|
|
@Query(value = "{ 'shippingAddresses' : { '$elemMatch' : { 'city' : { '$eq' : 'lnz' } } } }", fields = "{ 'shippingAddresses.$': ?0 }") |
|
|
|
|
@Query(value = "{ 'shippingAddresses' : { '$elemMatch' : { 'city' : { '$eq' : 'lnz' } } } }", |
|
|
|
|
fields = "{ 'shippingAddresses.$': ?0 }") |
|
|
|
|
Person findWithArrayPositionInProjection(int position); |
|
|
|
|
|
|
|
|
|
@Query(value = "{ 'fans' : { '$elemMatch' : { '$ref' : 'user' } } }", fields = "{ 'fans.$': ?0 }") |
|
|
|
|
@ -389,6 +389,6 @@ public interface PersonRepository extends MongoRepository<Person, String>, Query
@@ -389,6 +389,6 @@ public interface PersonRepository extends MongoRepository<Person, String>, Query
|
|
|
|
|
@Aggregation(pipeline = "{ '$group' : { '_id' : null, 'total' : { $sum: '$age' } } }") |
|
|
|
|
AggregationResults<SumAge> sumAgeAndReturnAggregationResultWrapperWithConcreteType(); |
|
|
|
|
|
|
|
|
|
@Query(value="{_id:?0}") |
|
|
|
|
@Query(value = "{_id:?0}") |
|
|
|
|
Optional<org.bson.Document> findDocumentById(String id); |
|
|
|
|
} |
|
|
|
|
|