Back

Default "order by" of a relationship

  • 0
  • Databases
  • Web
  • Cloud
devo_wm
19 Jun, 2024, 15:03

What's the best way to order a related field in a collection? is there a qay to set a default order by field? Or can you set the orderby in the query?

TL;DR
Developers asking how to set a default "order by" field in a relationship collection. The solution is to specify the desired order using the `orderBy()` method in the query.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more