Skip to content

Unable to sort multiple fields with OrderBy #94

Open
@sancho21

Description

@sancho21

Supposed that we have list of objects which have internalScore and externalScore. OrderBy can only sort one field only, either those two. If there are 2 records having the same internalScore, when it's already sorted by internalScore, then externalScore cannot be sorted. So, at the moment OrderBy cannot do this.

I wish it allowed us to call OrderBy multiple times which adds up instead of overriding it.

It's similar to SQL functionality:

SELECT * FROM tbl_Employee ORDER BY lastName ASC, Salary DESC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions