Expert |
|
Joined: Fri May 13, 2005 5:56 pm Posts: 308 Location: Santa Barbara, California, USA
|
I don't think it is possible in your specific instance. You _could_ use an orderby attribute in the Department.Professors collection mapping, but I am guessing you only have DepartmentID and ProfessorID in that association table. Ordering by one of those wouldn't give you rhe orderby you are looking for.
Your best bet is to introduce a business method in your DAO, or service layer and use the ICriteria interface.
Alternately, you could implement IComparable on the Professor object and then .Sort() the arraylist, but I've never done that with an IDictionary and I don't know if that is possible.
my .02.
-devon
|
|