How can I order the results of Query using more than 1 property?
For example, I want to order my Query results by 'lastname' and order by 'firstname' in each group of 'lastname'.
How can I order the results of Query using more than 1 property?
For example, I want to order my Query results by 'lastname' and order by 'firstname' in each group of 'lastname'.
Just use two orders separated by comma, e.g.:
SELECT * FROM person ORDER BY lastname, firstname
See here for more details.
Have you tried:
Person.all().order("lastname").order("firstname")