4
4
using NHibernate . Mapping ;
5
5
using System ;
6
6
using NHibernate . Util ;
7
- using Array = System . Array ;
8
7
9
8
namespace NHibernate . Cfg . XmlHbmBinding
10
9
{
@@ -14,7 +13,6 @@ public class PropertiesBinder : ClassBinder
14
13
private readonly Component component ;
15
14
private readonly string entityName ;
16
15
private readonly System . Type mappedClass ;
17
- private readonly string className ;
18
16
private readonly bool componetDefaultNullable ;
19
17
private readonly string propertyBasePath ;
20
18
@@ -38,7 +36,6 @@ public PropertiesBinder(Mappings mappings, PersistentClass persistentClass)
38
36
this . persistentClass = persistentClass ;
39
37
entityName = persistentClass . EntityName ;
40
38
propertyBasePath = entityName ;
41
- className = persistentClass . ClassName ;
42
39
mappedClass = persistentClass . MappedClass ;
43
40
componetDefaultNullable = true ;
44
41
component = null ;
@@ -50,7 +47,6 @@ public PropertiesBinder(Mappings mappings, Component component, string className
50
47
persistentClass = component . Owner ;
51
48
this . component = component ;
52
49
entityName = className ;
53
- this . className = component . ComponentClassName ;
54
50
mappedClass = component . ComponentClass ;
55
51
propertyBasePath = path ;
56
52
componetDefaultNullable = isNullable ;
@@ -116,7 +112,7 @@ public void Bind(IEnumerable<IEntityPropertyMapping> properties, Table table, ID
116
112
117
113
mappings . AddCollection ( collection ) ;
118
114
119
- property = CreateProperty ( collectionMapping , className , collection , inheritedMetas ) ;
115
+ property = CreateProperty ( collectionMapping , mappedClass , collection , inheritedMetas ) ;
120
116
BindCollectionProperty ( collectionMapping , property ) ;
121
117
}
122
118
else if ( ( propertiesMapping = entityPropertyMapping as HbmProperties ) != null )
@@ -428,11 +424,11 @@ private Property CreateProperty(IEntityPropertyMapping propertyMapping, System.T
428
424
return property ;
429
425
}
430
426
431
- private Property CreateProperty ( IEntityPropertyMapping propertyMapping , string propertyOwnerClassName , Mapping . Collection value , IDictionary < string , MetaAttribute > inheritedMetas )
427
+ private Property CreateProperty ( IEntityPropertyMapping propertyMapping , System . Type propertyOwnerType , Mapping . Collection value , IDictionary < string , MetaAttribute > inheritedMetas )
432
428
{
433
429
if ( string . IsNullOrEmpty ( propertyMapping . Name ) )
434
430
{
435
- throw new MappingException ( "A property mapping must define the name attribute [" + propertyOwnerClassName + "]" ) ;
431
+ throw new MappingException ( "A property mapping must define the name attribute [" + propertyOwnerType + "]" ) ;
436
432
}
437
433
438
434
var propertyAccessorName = GetPropertyAccessorName ( propertyMapping . Access ) ;
0 commit comments