Last post Sep 23, 2011 12:23 PM by Lannie
Sep 22, 2011 10:53 AM|itsbpk|LINK
Hi, I need some help...
when I use 'distinct' and 'take' with entity framework pointing to oracle db using dot connect, the query being generated is bad.
it does the take 10 first followed by distinct which results in data loss....
any work around for these ?'
the entity framework query is - query.Select(select).Distinct().Take(100).ToList()
"Limit1".NM AS name
FROM ( SELECT DISTINCT
"Extent2".NM AS name
FROM item "Extent1"
LEFT OUTER JOIN category "Extent2" ON "Extent1".ID = "Extent2".ID
WHERE ("Extent1".ID = 8070) AND ROWNUM <= 100
Sep 22, 2011 07:48 PM|Lannie|LINK
Try this from SQL prompt
and if works move into code without the double quotes
In addition, you might need to put the SCHEMA_NAME before each TABLE_NAME separated by Period Symbol
Limit1.NM AS name
Extent2.NM AS name
LEFT OUTER JOIN
ON Extent1.ID = Extent2.ID
Extent1.ID = 8070
ROWNUM <= 100
Sep 23, 2011 09:05 AM|itsbpk|LINK
The query is generated by entity framework and I suppose its an issue with dot connect or entiy framework.
Sep 23, 2011 12:23 PM|Lannie|LINK
go to the ORacle OTN for .NET forum as it is more frequently visited by Oracle Corporation employees who developed .NET