May 17, 2011 at 9:03 PM
Edited May 17, 2011 at 9:04 PM
We usually don't put OrderBy on queries registered in the DQM, since then there's no way to get rid of it (then you order by something else AND the new order criteria, not instead).
What we usually do is use the Order property in the FindOptions, this is the proper way or setting a default Order for a dynamic query.
Given said that, you right this used to work:
In Signum Framework 1.0 we were able to 'reorder orderby' so they are always in the outer most query.
In Signum Framework 2.0 we removed all this complex code and we rely in the programmer using OrderBy at the end of the query, we have been like this for a year now.
Two weeks ago, i regret about this decision and I put the feature in again, with some other big changes in the LINQ Provided that I've made recently
* OrderBy reordering
* Reverse, Last and LastOrDefault
* Some other candies (Truncate, etc...)
* Database.QueryMList<> with UnsafeDelete and UnsafeUpdate support
* Entities are now Retrived using LINQ queries only (Retriever class is gone) resulting in much better performance.
All this features are over and have been tested against our battery of queries (arround 400 tests) but we haven't integrated it yet with the rest of our applications so i'm not 100% confident yet.
We are also preparing other big changes in the way 'dot joins' work:
* Being able to simplify some SelectMany to joins/ outer joins
* Being able to efficiently translate First/Single/FirstOrDefault/SingleOrDefault when inside of the query
I hope I've find time to finish all this changes, and test them properly. They shouldn't make any code changes.