I\'m trying to build a universal method of building queries for various models based on input from the frontend. Some queries require filter or sort on child table columns.