Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated wrong SQL when use where TableA.TableB.Field == 'abc' #6763

Closed
juchunwei opened this issue Oct 13, 2016 · 1 comment
Closed

generated wrong SQL when use where TableA.TableB.Field == 'abc' #6763

juchunwei opened this issue Oct 13, 2016 · 1 comment

Comments

@juchunwei
Copy link

when I code:

_context.Leaves.Where(l => l.Empl.Name=="ju")

the SQL generated:

SELECT [l].[Id], [l].[Date], [l].[DepartmentId], [l].[EmplId], [l].[Hours], [l].[LeaveType], [l.Empl].[Id], [l.Empl].[DepartmentId], [l.Empl].[FromDate], [l.Empl].[LeaveDate], [l.Empl].[Name], [l.Empl].[OperationId], [l.Empl].[Section], [l.Empl].[SkillLevel]
FROM [Leaves] AS [l]
LEFT JOIN [Empls] AS [l.Empl] ON [l].[EmplId] = [l.Empl].[Id]
ORDER BY [l].[EmplId]

why it select all the fields in table Empl? and can't find 'where'

is this a bug?

@maumar
Copy link
Contributor

maumar commented Oct 13, 2016

All fields are selected due to this issue: #6647
Where is not in the query due to issue #4588 (which has already been fixed and will be available in 1.1.0)

@maumar maumar closed this as completed Oct 13, 2016
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants