Orderby clause automatically added
Posted: Thu 02 Aug 2012 12:10
Hi,
I have the following statement:
that generates the following sql:
Please note the ORDER BY clause that is added automatically at the end of the SQL statement, even the initial statement doesn't have any ORDER BY.
The ORDER BY value is the key property of the entity(defined using DataServiceKey attribute) that the query creates(e.g Lock)
My question is if there is a setting somewhere in order to disable this "feature"?
I'm using Entity Framework Entity Framework 4.1 and Devart.Data.Oracle 6.80.
Thank you in advance for your answer.
I have the following statement:
Code: Select all
var query = from lck in dataContext.EntityLockSet
select new Lock
{
LockId = lck.Id,
LockDescr = lck.Description,
};
Code: Select all
SELECT
"top".C1,
"top".ID,
"top".DESCRIPTION
FROM ( SELECT
"Project1".ID,
"Project1".DESCRIPTION,
"Project1".C1
FROM ( SELECT
"Extent1".ID,
"Extent1".DESCRIPTION,
1 AS C1
FROM ENTITY_LOCK "Extent1"
) "Project1"
[b]ORDER BY "Project1".ID ASC[/b]
) "top"
The ORDER BY value is the key property of the entity(defined using DataServiceKey attribute) that the query creates(e.g Lock)
Code: Select all
[DataServiceKey("LockId")]
public class Lock
{
public Guid LockId { get; set; } //key
}
I'm using Entity Framework Entity Framework 4.1 and Devart.Data.Oracle 6.80.
Thank you in advance for your answer.