-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.0
-
Component/s: Linq
-
None
The following throws an exception in BsonClassMap, in one of the internal checks:
public class SomeBaseType
{
public int X
}
public class MyType : SomeBaseType
{
public int Y {get; set;}
}
_collection.AsQueryable().Select(collType => new MyType
{ Y = collType.SomeField; });
Basically, if the projection expression attempts to populate a member not directly in the type being constructed.
I will update this issue with more complete code and if possible a PR - just wanted to log it down before I forget.!
- duplicates
-
CSHARP-1253 Cannot deserialize inherited members with aggregation queries (fluent API)
- Closed