Topic: paginate ordered by a column in an associated table
I have a Merchant model and a Product model. I want to display all products in a paginated, sortable table. That is pretty easy, the problem is that I'd like to include the associated merchant name for each product in the table AND I'd like the user to be able to sort this table by the merchant name. I'm a n00b at ORM and I can't seem to see a way to order the paginate result by the merchant name.
Thanks for your help,