Register FlowScope class map in MongoDB feature to handle serialization and ignore extra elements. (#6766)

This commit is contained in:
Sipke Schoorstra 2025-07-03 22:21:40 +02:00 committed by GitHub
parent 99370502dc
commit b8a04b11d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,6 +78,12 @@ public class MongoDbFeature(IModule module) : FeatureBase(module)
map.SetIgnoreExtraElements(true); // Needed for missing ID property
map.MapProperty(x => x.Key); // Needed for non-setter property
});
BsonClassMap.TryRegisterClassMap<FlowScope>(map =>
{
map.AutoMap();
map.SetIgnoreExtraElements(true);
});
}
private static void TryRegisterSerializerOrSkipWhenExist(Type type, IBsonSerializer serializer)