@@ -401,16 +401,14 @@ private void BindCollectionProperty(ICollectionPropertiesMapping collectionMappi
401
401
private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , SimpleValue value , IDictionary < string , MetaAttribute > inheritedMetas )
402
402
{
403
403
if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
404
- {
405
404
throw new MappingException ( "A property mapping must define the name attribute [" + propertyOwnerType + "]" ) ;
406
- }
407
405
408
406
var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
409
407
410
408
if ( propertyOwnerType != null && value . IsSimpleValue )
411
409
value . SetTypeUsingReflection ( propertyOwnerType , propertyMapping . Name , propertyAccessorName ) ;
412
410
413
- var property = new Property
411
+ return new Property
414
412
{
415
413
Name = propertyMapping . Name ,
416
414
PropertyAccessorName = propertyAccessorName ,
@@ -420,16 +418,12 @@ private Property CreateProperty(IEntityPropertyMapping propertyMapping, System.T
420
418
IsOptimisticLocked = propertyMapping . OptimisticLock ,
421
419
MetaAttributes = GetMetas ( propertyMapping , inheritedMetas )
422
420
} ;
423
-
424
- return property ;
425
421
}
426
422
427
423
private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , Mapping . Collection value , IDictionary < string , MetaAttribute > inheritedMetas )
428
424
{
429
425
if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
430
- {
431
426
throw new MappingException ( "A property mapping must define the name attribute [" + propertyOwnerType + "]" ) ;
432
- }
433
427
434
428
var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
435
429
0 commit comments