Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.8, 1.8.1, 1.8.2
-
None
-
None
Description
The below NUnit test will throw the error. The NamedIdMemberFinderConvention should not be mapping overridden members.
[TestFixture]
|
public class AbstractIdInBaseClassTests
|
{
|
private abstract class BaseClass
|
{
|
public abstract int Id { get; set; }
|
}
|
|
|
private class Impl : BaseClass
|
{
|
public override int Id { get; set; }
|
}
|
|
|
[Test]
|
public void TestSerialization()
|
{
|
var impl = new Impl { Id = 1 };
|
|
|
var doc = impl.ToBsonDocument();
|
|
|
var expected = new BsonDocument("_id", 1);
|
Assert.AreEqual(expected, doc);
|
}
|
}
|