-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
None
-
Affects Version/s: 1.8
-
Component/s: None
-
Environment:Windows 8, MongoDB 2.4
-
Fully Compatible
We upgrade to the 1.8 driver via NuGet this morning and instantly brought down our dev environment.
Here is part of the stack trace:
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at MongoDB.Bson.Serialization.BsonClassMap`1.ResolveExplicitProperty(MemberInfo interfaceMemberInfo, Type targetType)
at MongoDB.Bson.Serialization.BsonClassMap`1.GetMemberInfoFromLambda[TMember](Expression`1 memberLambda)
at MongoDB.Bson.Serialization.BsonClassMap`1.GetMemberNameFromLambda[TMember](Expression`1 memberLambda)
Here is some snippets that will show how to reproduce:
protected override void ConfigureClassMap(BsonClassMap<T> cm) {
cm.SetIdMember(cm.GetMemberMap(c => c.Id).SetRepresentation(BsonType.ObjectId));
}
..
where T : class, IIdentity, new() {
..
public interface IIdentity {
string Id
}
..
public class JobHistory : IIdentity {
public string Id
}
..
- is related to
-
CSHARP-637 Fluent Lambda Expressions Don't Resolve Interfaces
- Closed