Hello,
I’m trying to paginate through the list of sorted identities. An identity has a first_name and last_name.
I am constructing the query based on the parameters provided in the simplest case the query looks like this:
SELECT x.*, meta(x).id as id FROM %s x WHERE x.type="identity" ORDER BY $orderBy ASC OFFSET $offset LIMIT $limit
Parameters used: map[limit:10 offset:0 orderBy:x.first_name]
(the %s will be replaced by the bucket name)
But for some reason the ordering doesn’t work. If I copy-paste the same query in the web console then ordering works fine. I’m at a loss. Any help would be greatly appreciated.
For completion: Here is how an example of an identity:
{
"id": "0091d400-ba25-11eb-b15b-000d3a8356e9",
"type": "identity",
"first_name": "test1",
"last_name": "test",
"is_cockpit_user": false,
"credentials": [
{
"email": "test1@test.com",
"password": "",
"is_validated": false,
"main_for_tenant": [
{
"tenant_id": "610",
"created_at": "0001-01-01T00:00:00Z"
}
]
}
]
}