On Sun, Sep 14, 2008 at 7:42 PM, Pascal Craponne <[EMAIL PROTECTED]> wrote:
>
> It appears that the test also fails with linq-to-SQL, which makes me think
> that there should not at all be an outer join here (I'll investigate a bit
> further anyway). If I'm right, the test is wrong and we'll need to fix it.
>
it is working for my linq2sql.
this is the sample:
var query = from e in db.Employees
select new
{
Name = e.FirstName,
ReportsTo = e.ReportsToEmployee.FirstName
};
this is our generated sql for mssql:
SELECT e$.[FirstName], t1$.[FirstName]
FROM [dbo].[Employees] e$, [dbo].[Employees] t1$
WHERE CONVERT(int,e$.[ReportsTo]) = t1$.[EmployeeID]
2008-09-14 20:08:11Z Select SQL: SELECT e$.[FirstName], t1$.[FirstName]
FROM [dbo].[Employees] e$, [dbo].[Employees] t1$
WHERE CONVERT(int,e$.[ReportsTo]) = t1$.[EmployeeID]
it fails in the assertion:
Assert.AreEqual(3, list.Count)
this is linq2sql generated sql:
SELECT [t0].[FirstName] AS [Name], [t1].[FirstName] AS [ReportsTo]
FROM [dbo].[Employees] AS [t0]
LEFT OUTER JOIN [dbo].[Employees] AS [t1] ON [t1].[EmployeeID] =
[t0].[ReportsTo]
it doesn't fail in the assertion.
Therefore outter joins should be implicit created.
Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---