Closed
Description
Robert Stiller opened DATAMONGO-184 and commented
It would be helpful to have the option for field-selection using a org.springframework.data.domain.Pageable
.
I guess the best way to do it is to extend org.springframework.data.domain.PageRequest
(may named "MongoPageRequest")
with the extra option for the fields, so queries like that are possible:
List<MyObjectWithVeryFewData> list = myRepository.findAll(new MongoPageRequest(
0, // page
10, // size
new Sort("name"), // sort
Arrays.asList("name", "attributes.myOption") // selects only the name and myOption of the attributes ...
));
No further details from DATAMONGO-184