|
From: David S. (JIRA) <nh...@gm...> - 2011-01-05 10:26:01
|
Distinct() extension method problem with Object Initialisers
------------------------------------------------------------
Key: NH-2486
URL: http://216.121.112.228/browse/NH-2486
Project: NHibernate
Issue Type: Bug
Components: Linq Provider
Affects Versions: 3.0.0.GA
Reporter: David Siew
Priority: Minor
This code will fail:
var data = (from v in this.GetSession().Query<WorkCellLoadGraphData>()
where v.WorkCellId == "13"
select
new WorkCellLoadGraphData
{
RowId = v.RowId,
WorkCellId = v.WorkCellId,
WorkCellName = v.WorkCellName,
WorkCellGroupId = v.WorkCellGroupId,
WorkCellGroupName = v.WorkCellGroupName
});
return data.Distinct();
However, running this code:
var data = (from v in this.GetSession().Query<WorkCellLoadGraphData>()
where v.WorkCellId == "13"
select v
);
return data.Distinct();
will "work".
The error I get is: "Expression type 10005 is not supported by this SelectClauseVisitor."
--
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
|