Duplicate
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
Christian Axelsson
Christian AxelssonLabels
Components
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created May 16, 2011 at 5:14 AM
Updated January 26, 2013 at 12:30 AM
Resolved January 26, 2013 at 12:29 AM

Tested on trunk and 3.1.0.
The following code:
var persons = from p in session.Query<Person>()
select new
{
p.Id,
p.Bookings
};
generates the following broken SQL (note the second column):
select person0_.ID as col_0_0_, . as col_1_0_, bookings1_.ID as ID1_, bookings1_.StartTime as StartTime1_, bookings1_.EndTime as EndTime1_ from dbo.Person person0_ inner join dbo.Booking bookings1_ on person0_.ID=bookings1_.PersonId
The person and booking classes are both trivial. A zip file containing the classes and their configuration is attached.
Tested on 3.1.0GA and trunk revision 5828. Provider used is MsSql2008Dialect.