-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
when a select(x => x.{Navigation Property}) the SQL generated is invalid
To Reproduce
Steps to reproduce the behavior:
on release 4.2.0 execute the following code
Expression select = person
.Renters
.Where((Renter) =>
DateTime.Today.Between(Renter.StartDate, Renter.EndDate.GetValueOrDefault(DateTime.Today.AddDays(1))))
.Include(x => x.Unit)
.Select(x => x.Unit)
.Expression;
Expected behavior
the SELECT SQL generated should have been:
SELECT [T1].[ID], [T1].[Bedrooms] AS [NumberOfBedrooms], [T1].[StatusID], [T1].[RealEstatePropertyID]
FROM [dbo].[Renter] AS [T2]
INNER JOIN [dbo].[Unit] AS [T1]
ON ([T1].[ID] = [T2].[UnitID])
WHERE (([T2].[PersonID] = @personid_1) AND @dt_value_2 BETWEEN [T2].[StartDate] AND COALESCE([T2].[EndDate], @dt_value_3))
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working