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
|
Hi, We are trying to migrate one of our application from LightSpeed 2.2 to 3.0. When we use the new DLL (no other changes) we get the following exception: A column has been specified more than once in the order by list. Columns in the order by list must be unique. [System.Data.SqlClient.SqlException] We have managed to track down the cause of the problem (a LINQ expression is being ordered by the same column in two different places) so we can fix it. However, before we fix it, we just wanted to check whether this was a deliberate change in functionality? If not, will the functionality be reverted back to 2.2 or will it be kept the way it is? I can provide an example of how to replicate the error if needed.
Craig |
|
|
This wasn't a deliberate change in functionality, but I can't promise we'll revert it. If you can provide us with the repro case we can take a look and decide whether we should fix it or not, or at least try to improve the error reporting. Thanks for letting us know about this! |
|
|
Hi Ivan, Here is a very basic repo:
var context = new LightSpeedContext<LightSpeedModel1UnitOfWork>();
context.ConnectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=LSCrashRepo;Integrated Security=True";
context.DataProvider = DataProvider.SqlServer2005; using
(var unitOfWork = context.CreateUnitOfWork())
{ var data1 = from record in unitOfWork.Data orderby record.Column1 select record;
var data2 = data1.OrderBy(r => r.Column1).ToList(); } This connects through to a MS-SQL Server 2005 database (it is connecting to an express version, but it also occurs on the enterprise version). The database contains a single table (Data), which has a couple of columns in it (Column1 and Column2). The main part to replicating this issue is doing multiple orderbys on the same column (either using the syntax sugar or the extension method.) Let me know if there is anything else you need.
Craig |
|