Query entity reversing the order of fields when retrieving objects of a Custom Data Type

When using a!queryEntity() to retrieve CDT objects from a table according to a filter, I have noticed that it reverses the order of columns/CDT fields.

Is there any way to prevent this? Why is this happening?

 Discussion posts and replies are publicly visible