You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The collections returned by endpoints using the CatalogueItemSearch::applyHQLOrder sorting method may have ambiguous order when items have labels that are equal except in case and the sort is case insensitive (which is default).
In some cases a request with order=asc is not equal to the reverse order of the same request with order=desc.
Steps to reproduce
Create a DataModel and create DataClasses with identical labels except for case, e.g. class1, Class1, etc.
List the DataClasses with the GET api/dataModels/$dataModelId/dataClasses endpoint, sometimes the order is not the reverse of the same request with ?order=desc.
Expected behavior
Ordering should be ORDER BY lower(label) <order>, label <order>.
Description
The collections returned by endpoints using the CatalogueItemSearch::applyHQLOrder sorting method may have ambiguous order when items have labels that are equal except in case and the sort is case insensitive (which is default).
In some cases a request with
order=asc
is not equal to the reverse order of the same request withorder=desc
.Steps to reproduce
Create a DataModel and create DataClasses with identical labels except for case, e.g.
class1
,Class1
, etc.List the DataClasses with the
GET api/dataModels/$dataModelId/dataClasses
endpoint, sometimes the order is not the reverse of the same request with?order=desc
.Expected behavior
Ordering should be
ORDER BY lower(label) <order>, label <order>
.Environment
mdm-core latest develop
Additional context
Found while reviewing at PR #375.
The text was updated successfully, but these errors were encountered: