Is there a way to retrieve objects of a %Library.RelationshipObject by a certain order

56 views Asked by At

This documentation has no mention of sorting the elements

1

There are 1 answers

4
DAiMor On BEST ANSWER

As an example I'll show sql query by class Sample.Employee in SAMPLES namespace, where properties Spouse and Company are relationships. You may get access to related object via -> and you can order by alias.

SELECT
  title,
  Spouse->Name,
  Company->Name as CompanyName 
FROM 
  sample.employee 
ORDER BY
  CompanyName