Hi guys, I would like to ask on how you do ordering on an object with 2 properties that are basically joined from 2 entities.
Lets say "ClassA" has a property named ClassB and ClassC which are also classes themselves. ClassB has a property named Name and ClassC also has a property named Name. Now, since ClassB and ClassC are both properties of ClassA, how can i order a list of ClassAs using the Name properties of ClassB and ClassC. Below is the sample NHibernate criteria code in C#:
ICriteria criteria = m_Session.CreateCriteria<ClassA>()
.AddOrder(Order.Asc("ClassB.Name"))
.AddOrder(Order.Asc("ClassC.Name"));
But the above code throws an error saying that "could not resolve property: ClassB.Name of: ClassA". Any help would be appreciated. Thanks a lot.