Skip to:
If target is an interface: Querying a dynamic-component using linq, results in an exception as follows:
System.InvalidCastException : Unable to cast object of type 'NHibernate.Type.ComponentType' to type 'NHibernate.Type.CollectionType'
Example:var product = (from p in session.Query<IProduct>() where p.Properties["Name"] == "First Product" select p).Single();
See also: https://nhibernate.jira.com/browse/NH-2664
Patch suggestion ist attached.
Thanks a lot!
Same in vNext.Test case (TestCase_NH3501.zip) and patch suggestion (VisitorUtil.cs) for vNext updated.
Can you please check if this does happen in vNext?
If target is an interface: Querying a dynamic-component using linq, results in an exception as follows:
System.InvalidCastException : Unable to cast object of type 'NHibernate.Type.ComponentType' to type 'NHibernate.Type.CollectionType'
Example:
var product = (from p in session.Query<IProduct>() where p.Properties["Name"] == "First Product" select p).Single();
See also: https://nhibernate.jira.com/browse/NH-2664
Patch suggestion ist attached.