Skip to content

FindOptions.sort() doesn't return correct values #62

@ArthurSav

Description

@ArthurSav

Hi, when sorting items i don't get all the results back.

ObjectFilter belongsToUser = eq("userId", 1);
FindOptions sortBy = FindOptions.sort("status", SortOrder.Descending)

//Without sorting
nitrate.getRepository(Post.class).find(belongsToUser) // returns 26 items

// With sorting
nitrate.getRepository(Post.class).find(belongsToUser, sortBy) // returns 5 items

Using FindOptions.sort should return the exact same items but sorted.

Note that status is not unique

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions