This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
let's say I have a model Member that has a property Administrator of type Member How would I build my query then for it to order by the property of MyMember.Administrator.Name ? I assumed it would be Query query = new Query(typeof(Member)); query.Order = Order.By("Administrator.Name");
but that throws an error |
|
|
May be it would be a good idea to implement a method FindUsingSql or something on the repository that expects a Select * from a given type but we can still do more complex querying that is currently unsupported. |
|
|
Yeah, I'll have a think about this. For your case above, how would you like the SQL to look? Cheers, Andrew. |
|
|
This probably won't be correct but it can give you an idea. Select m.*, a.Name as aName from Member m inner join Member a on m.AdministratorId = a.Id Order by aName |
|