Skip to content

Sort.and() does not handle TypedSort without explicit order [DATACMNS-1704] #2103

Closed
@spring-projects-issues

Description

@spring-projects-issues

hgarus opened DATACMNS-1704 and commented

This might me misunderstanding the API. I did try to sort by multiple properties doing the following:

Sort<MyEntity> myEntity = Sort.sort(MyEntity.class).by(MyEntity::getProperty1)
    .and(Sort.sort(MyEntity.class).by(MyEntity::getProperty2))

The result is a Sort by property2, looking at the code the reason seems to be Sort.and() accessing Sort.orders directly, which is empty for TypedSort


No further details from DATACMNS-1704

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions