Selecting into anonymous class generates invalid SQL
----------------------------------------------------
Key: NH-2707
URL: http://216.121.112.228/browse/NH-2707
Project: NHibernate
Issue Type: Bug
Components: Linq Provider
Affects Versions: 3.1.0
Reporter: Christian Axelsson
Priority: Major
Attachments: Models.zip
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|