-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.10.4
-
Component/s: Serialization
-
Labels:None
If you create a C# class with a property of type array and the constructor accepts an IEnumerable for that parameter the driver is not able to map the class.
Attached program that raises the exception. But basically here is the problem, this class triggers the error
public class TestArray
{
public TestArray(String id, IEnumerable<String> values)
public String Id { get; private set; }
public String[] Values { get; private set; }
}
This happens because the constructor accepts a parameter vlaues THAT HAS THE SAME NAME OF A PROPERTY BUT DIFFERENT TYPE, this generates the exception.
Also the error is not present if properties setters are public (because the mapper directly map properties).
Actually this is a serious bug, I've updated driver on a project of mine and I have tons of test failing for such classes.
Everything was fine with 2.7 driver.