Thanks! Just found that here: How to apply field based sorting on many-to-many relationships? - #2 by zachdaniel