@@ -386,16 +386,35 @@ private void BindCollectionProperty(ICollectionPropertiesMapping collectionMappi
386386 property . Cascade = collectionMapping . Cascade ?? mappings . DefaultCascade ;
387387 }
388388
389- private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , IValue value , IDictionary < string , MetaAttribute > inheritedMetas )
389+ private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , SimpleValue value , IDictionary < string , MetaAttribute > inheritedMetas )
390390 {
391391 var type = propertyOwnerType ? . UnwrapIfNullable ( ) ;
392392 if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
393393 throw new MappingException ( "A property mapping must define the name attribute [" + type + "]" ) ;
394394
395395 var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
396396
397- if ( type != null && value . IsSimpleValue )
398- value . SetTypeUsingReflection ( type . AssemblyQualifiedName , propertyMapping . Name , propertyAccessorName ) ;
397+ if ( type != null )
398+ value . SetTypeUsingReflection ( type , propertyMapping . Name , propertyAccessorName ) ;
399+
400+ return new Property
401+ {
402+ Name = propertyMapping . Name ,
403+ PropertyAccessorName = propertyAccessorName ,
404+ Value = value ,
405+ IsLazy = propertyMapping . IsLazyProperty ,
406+ LazyGroup = propertyMapping . GetLazyGroup ( ) ,
407+ IsOptimisticLocked = propertyMapping . OptimisticLock ,
408+ MetaAttributes = GetMetas ( propertyMapping , inheritedMetas )
409+ } ;
410+ }
411+
412+ private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , Mapping . Collection value , IDictionary < string , MetaAttribute > inheritedMetas )
413+ {
414+ if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
415+ throw new MappingException ( "A property mapping must define the name attribute [" + propertyOwnerType + "]" ) ;
416+
417+ var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
399418
400419 return new Property
401420 {
0 commit comments