You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a Discussion model plugged to a Message model through an hasMany relationship, how should I proceed to retrieve a specific discussion with its messages sorted in a particular order?
Setting a defaultScope with an { order: [['createdAt', 'DESC]] } on the Message model doesn't work, and setting sort: { default: '-createdAt' } in the message ressource doesn't work either.
The text was updated successfully, but these errors were encountered:
If I have a Discussion model plugged to a Message model through an hasMany relationship, how should I proceed to retrieve a specific discussion with its messages sorted in a particular order?
Setting a defaultScope with an
{ order: [['createdAt', 'DESC]] }
on the Message model doesn't work, and settingsort: { default: '-createdAt' }
in the message ressource doesn't work either.The text was updated successfully, but these errors were encountered: