-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: Public Preview 1
-
None
-
Dotnet Drivers
Follow the Getting Started example, add a simple List property:
`public IList<string>? TestStringArray { get; set; }`
Serializing works:
```
"TestStringArray":
```
Deserializing fails:
```
An exception of type 'MongoDB.Bson.BsonSerializationException' occurred in MongoDB.EntityFrameworkCore.dll but was not handled in user code: 'Unknown discriminator value 'List`1'.'
at MongoDB.Bson.Serialization.BsonSerializer.LookupActualType(Type nominalType, BsonValue discriminator) at MongoDB.Bson.Serialization.Conventions.StandardDiscriminatorConvention.GetActualType(IBsonReader bsonReader, Type nominalType) at MongoDB.Bson.Serialization.Serializers.DiscriminatedWrapperSerializer`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize[TValue](IBsonSerializer`1 serializer, BsonDeserializationContext context) at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args) at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize(IBsonSerializer serializer, BsonDeserializationContext context) at MongoDB.Bson.Serialization.BsonSerializationInfo.DeserializeValue(BsonValue value) at MongoDB.EntityFrameworkCore.Serializers.SerializationHelper.ReadElementValue[T](BsonDocument document, BsonSerializationInfo elementSerializationInfo) at MongoDB.EntityFrameworkCore.Query.QueryingEnumerable`2.Enumerator.MoveNextHelper() at MongoDB.EntityFrameworkCore.Query.QueryingEnumerable`2.Enumerator.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
```
- duplicates
-
EF-88 Unknown discriminator value 'List`1' error
- Closed