I am looking to order my parent model by the most recent created at date in a has many included model. I am currently using this ordering, but it seems to use all the activity, not just the most recent one:[[{ model: models.Activity, as: 'activity' }, 'createdAt', order]]I am looking to sort the parent by only the most recent addition to the database, not necessarily the first entry. Any suggestions?
Submitted February 10, 2020 at 04:25PM by NoCall2
No comments:
Post a Comment