when i build mapping builder using IMappingBuilderAdapter<>.Build()
it throws error like:
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Xtensive.ObjectMapping.MappingBuilder.BindToSource(TargetTypeDescription targetType, TargetPropertyDescription property) in c:\Work\DataObjects.Net\4.4\Xtensive.Core\Xtensive.Core\ObjectMapping\MappingBuilder.cs:line 251
at Xtensive.ObjectMapping.MappingBuilder.BuildTargetPropertyDescriptions(TargetTypeDescription targetType) in c:\Work\DataObjects.Net\4.4\Xtensive.Core\Xtensive.Core\ObjectMapping\MappingBuilder.cs:line 239
at Xtensive.ObjectMapping.MappingBuilder.BuildTargetDescriptions() in c:\Work\DataObjects.Net\4.4\Xtensive.Core\Xtensive.Core\ObjectMapping\MappingBuilder.cs:line 217
at Xtensive.ObjectMapping.MappingBuilder.Build() in c:\Work\DataObjects.Net\4.4\Xtensive.Core\Xtensive.Core\ObjectMapping\MappingBuilder.cs:line 128
It is hard to find whats wrong with mapping. Later i found (thanks to access to DO4 repository :-)) that i have property "XYZ" in real entity class but does not have such property in DTO class and this is an reason why its fails. Could you add some check for missing mapping of properties and throw your own exception with detailed error which property missing on which type?
Update: v4.4 Build number 7589
asked
Jun 10 '11 at 08:52
Peter Ĺ ulek
492●31●32●36
Thanks, Peter.
Will do.