Search code examples
castle-activerecord

ActiveRecord relational order by


How can I perform I relational order by query? Let's say I have a class call Car which has a Property called Person which is another model. Person has a property called name. I want to get all cars but order by the persons names. The search should be something similar to this but working

var order = new Order[] { new Order("Person.Name", true) };
return FindAll(order);

Solution

  • I think it's supposed to be:

    var order = new Order[] { Order.Asc("Person.Name", true) };