Skip to content

List column sorting does not work when using embeds #192

Description

@rainer-friederich

When embedding a relationship like described in #191 the column where the embedded resource is used can not be sorted anymore.

In my case I'm embedding the "defect-category" and display the title inside the list.

When clicking on the table header for the "defect-category title" the url is updated to the following:

http://localhost:3001/defect-metadata?filter={}&order=ASC&page=1&perPage=10&sort=defect-category.title

The request to PostgREST which is done looks like the following:

http://localhost:3001/api/admin/defect-metadata?offset=0&limit=10&order=defect-category.title.asc&select=*,defect-category(*) which then leads to an error returned by the API:

{
  "code": "PGRST100",
  "details": "unexpected \"t\" expecting \"asc\", \"desc\", \"nullsfirst\" or \"nullslast\"",
  "hint": null,
  "message": "\"failed to parse order (defect-category.title.asc)\" (line 1, column 17)"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions