@@ -386,16 +386,35 @@ private void BindCollectionProperty(ICollectionPropertiesMapping collectionMappi
386
386
property . Cascade = collectionMapping . Cascade ?? mappings . DefaultCascade ;
387
387
}
388
388
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 )
390
390
{
391
391
var type = propertyOwnerType ? . UnwrapIfNullable ( ) ;
392
392
if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
393
393
throw new MappingException ( "A property mapping must define the name attribute [" + type + "]" ) ;
394
394
395
395
var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
396
396
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 ) ;
399
418
400
419
return new Property
401
420
{
0 commit comments