Permalink
Browse files

binders refactoring

git-svn-id: https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk@4887 d2eaab8a-a80d-0410-be94-99ecdb4ea5df
  • Loading branch information...
1 parent 0431666 commit ac1ba503401e2436c2335a5abbdb7f910d09665c fabiomaulo committed Dec 1, 2009
@@ -17,7 +17,9 @@ public void BindId(HbmId idSchema, PersistentClass rootClass, Table table)
{
if (idSchema != null)
{
- var id = new SimpleValue(table) { TypeName = idSchema.type1 };
+ var id = new SimpleValue(table);
+ new TypeBinder(id, Mappings).Bind(idSchema.Type);
+
rootClass.Identifier = id;
Func<HbmColumn> defaultColumn = () => new HbmColumn
@@ -29,11 +29,12 @@ public void Bind(string typeName)
Bind(new HbmType { name= typeName });
}
- private void Bind(HbmType typeMapping)
+ public void Bind(HbmType typeMapping)
{
if (typeMapping == null)
{
- throw new ArgumentNullException("typeMapping");
+ // will find the type through reflection
+ return;
}
string originalTypeName = typeMapping.name;
if(originalTypeName == null)

0 comments on commit ac1ba50

Please sign in to comment.