-
Type:
Bug
-
Resolution: Done
-
Priority:
Unknown
-
Affects Version/s: None
-
None
-
None
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
A property can be defined as having a Bson Representation:
mb.Entity<Customer>().Property(e => e.Value).HasRepresentation(BsonType.Decimal128);
And it can also be defined as having a ValueConverter
mb.Entity<Customer>().Property(e => e.Value).HasConversion<Decimal128>();
However if you use these two features together the Bson Representation is silently dropped.
mb.Entity<Customer>().Property(e => e.Value).HasConversion<Decimal128>().HasRepresentation(BsonType.Decimal128);
Will store the vaule as a string (the default for Decimal128).
This scenario is likely uncommon but should be fixed. ValueConverterSerializer will need to be extended to support IRepresentationConfigurable and IRepresentationConverterConfigurable.