Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sort by multiple field keys fail #168

Open
@sprzenus

Description

What I'm trying to do is to get sorted and paginated categories:

Category.query(on: req.db)
 .sort([Category.FieldKeys.nameEN, Category.FieldKeys.namePL])
 .paginate(PageRequest(page: options.page, per: options.itemsPerPage))

The logs I get from my database:

2020年10月17日 09:45:49.272 UTC [2275] LOG: execute <unnamed>: SELECT COUNT("categories"."id") AS "aggregate" FROM "categories"
2020年10月17日 09:45:49.278 UTC [2275] ERROR: operator does not exist: text ->> unknown at character 322
2020年10月17日 09:45:49.278 UTC [2275] HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2020年10月17日 09:45:49.278 UTC [2275] STATEMENT: SELECT "categories"."id" AS "categories_id", "categories"."name" AS "categories_name", "categories"."name_pl" AS "categories_name_pl", "categories"."is_free" AS "categories_is_free", "categories"."updated_at" AS "categories_updated_at", "categories"."created_at" AS "categories_created_at" FROM "categories" ORDER BY name->>'name_pl' ASC LIMIT 30 OFFSET 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /