Sort behavior is different locally vs. in sandbox?

0
Hi, is this expected behavior? When sorting the following attributes locally I see this: Note how _Guid is first when sorting “Ascending”. This is what I get when I deploy to the cloud (Sandbox): Note how _Guid is now number 5 in the list. It seems that locally, the sort uses the first character “_” to sort. In the Sandbox it looks like “_” is being ignored and it sorts on the second character “G”. Why is this?
asked
2 answers
1

Think I already found the answer. The local deployment uses HSQLDB and the public sandbox is a Postgresql db:
https://docs.mendix.com/refguide/case-sensitive-database-behavior

But more specifically it seems to be an issue with differences in collation between the two. Because I’m running locally on a windows machine and the cloud node is most likely a unix system, they probably have different collations, which can lead to different sorting results, even if the same DB is used (e.g. Postgresql):
https://stackoverflow.com/questions/31924829/postgresql-order-by-returning-two-different-orders/31925591#31925591

I’m going to try and see if I can do a retrieve and then use the “List Sort” activity to get the same sort result across both locally and sandbox deploys.

answered
0

Yes, the List Sort action solved this for me. Most likely because it’s using Java to do the sorting vs. the underlying DB.

answered