fix: register SerializedKeyValuePair.Key to BsonClassMap (#6036)

Manually register SerializedKeyValuePair.Key to BsonClassMap to prevent index creation failure.
This commit is contained in:
Devin Lin 2024-10-17 01:20:17 +08:00 committed by GitHub
parent 99ab5e4ba1
commit 2eee58af66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,7 @@ public class MongoDbFeature : FeatureBase
{
map.AutoMap();
map.SetIgnoreExtraElements(true); // Needed for missing ID property
map.MapProperty(x => x.Key); // Needed for non-setter property
});
}