-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
Description
Describe the bug
Neo4j.Driver.Mapping.MappingFailedException: 'Cannot map record to type X because the record does not contain a value for the property 'Y'.'
Did the behaviour change?
To Reproduce
Use AsObject on a class where returned type is camelcase and property is pascalcase
public class MapperConfiguration : IMappingProvider
{
public void CreateMappers(IMappingRegistry registry)
{
registry
.RegisterMapping<X>(
mb =>
{
mb.UseDefaultMapping();
mb.Map(m => m.Y, "y");
});
}
}
RecordObjectMapping.RegisterProvider<MapperConfiguration>();
Expected behavior
It should map camelcase to pascalcase but not other way around and it should not matter if the property does not exists on the back-end side or it should be a optional configuration at least a option to disable it.
Version Info (please complete the following information):
- .NET Version: .NET 8
- .NET Driver Version 5.21.0
- Neo4j Server Version & Edition 5.x