Fixed
Details
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
TorvinK
TorvinKLabels
Components
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created November 28, 2012 at 3:28 PM
Updated September 8, 2014 at 11:32 AM
Resolved January 25, 2013 at 11:30 PM
Here is the test for NHibernate.Test.Linq.ProjectionsTests that explains it all:
[Test]
public void ProjecitonWithCollection()
{
var query = (from o in db.Orders
select new { o, o.OrderLines }) // done by WCF DS: context.Orders.Expand(o => o.OrderLines) from the client
.ToList();
}
This fails with `ADOExceptionReporter:444 - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'NHibernate.DomainModel.Northwind.Entities.OrderLine' to type 'System.Collections.Generic.ISet`1[NHibernate.DomainModel.Northwind.Entities.OrderLine]'.`.
So, this essentially prevents from expanding any collection properties from the client side, which is a major performance drawback.