Forest new agent, ordering collection

Feature(s) impacted

listing records of collection

Observed behavior

the items are ordered by default by id (key) ascending

Expected behavior

the collection is a view in database and it has a specific order defined
image
however this order seems to be overrided by the default order by id

no sorting field is defined in the config:

Context

in the old agent version it was listing following the order of the view as in database.

  • Project name: clevermate v2
  • Environment name: dev
  • Agent technology: (nodejs,
  • Database type: postgres

Hi @Adel_de_Clevermate

Is Hunter Game a smart collection ?

Regards,

Shohan

Hi @shohanr ,
No, it’s a normal collection, a view in DB.

Hello @Adel_de_Clevermate,

Looking through the sorting implementation on the agent package, we realised that it was not letting the database apply default sorting and forcing a sort on primary keys when no sort was requested from the frontend.
This has been fixed in the latest agent version. Please upgrade and let us know if this is the expected behaviour for you.
Please note that you will still have to unset any sort order in your collection layout :pray:

@Nicolas.M