Skip to content

Field-Selection using Pageable [DATAMONGO-184] #1119

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions