开发者

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 th开发者_开发百科e persons names. The search should be something similar to this but working

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


I think it's supposed to be:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜