From: Peter S. <sz...@us...> - 2004-04-15 13:21:27
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14691/NHibernate/Cfg Modified Files: Binder.cs Configuration.cs Log Message: Still working on alias. Except for one testcase, everything looks ok. Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Binder.cs 15 Apr 2004 11:51:42 -0000 1.14 --- Binder.cs 15 Apr 2004 13:21:17 -0000 1.15 *************** *** 16,19 **** --- 16,20 ---- private static XmlNamespaceManager nsmgr; private static readonly string nsPrefix = "hbm"; + private static Dialect.Dialect dialect; public static void BindClass(XmlNode node, PersistentClass model, Mappings mapping) { *************** *** 110,114 **** } ! public static void BindRootClass(XmlNode node, RootClass model, Mappings mappings) { BindClass(node, model, mappings); --- 111,117 ---- } ! public static void BindRootClass(XmlNode node, RootClass model, Mappings mappings, Dialect.Dialect d) { ! ! dialect = d; BindClass(node, model, mappings); *************** *** 725,729 **** } else if ( "joined-subclass".Equals(name) ) { Subclass subclass = new Subclass(model); ! BindJoinedSubclass( subnode, subclass, mappings ); model.AddSubclass(subclass); mappings.AddClass(subclass); --- 728,732 ---- } else if ( "joined-subclass".Equals(name) ) { Subclass subclass = new Subclass(model); ! BindJoinedSubclass( subnode, subclass, mappings); model.AddSubclass(subclass); mappings.AddClass(subclass); *************** *** 847,851 **** } ! public static void BindRoot(XmlDocument doc, Mappings model) { XmlNode hmNode = doc.DocumentElement; --- 850,854 ---- } ! public static void BindRoot(XmlDocument doc, Mappings model, Dialect.Dialect dialect) { XmlNode hmNode = doc.DocumentElement; *************** *** 867,871 **** foreach(XmlNode n in hmNode.SelectNodes(nsPrefix + ":class", nsmgr) ) { RootClass rootclass = new RootClass(); ! Binder.BindRootClass(n, rootclass, model); model.AddClass(rootclass); } --- 870,874 ---- foreach(XmlNode n in hmNode.SelectNodes(nsPrefix + ":class", nsmgr) ) { RootClass rootclass = new RootClass(); ! Binder.BindRootClass(n, rootclass, model, dialect); model.AddClass(rootclass); } Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Configuration.cs 13 Apr 2004 02:05:03 -0000 1.10 --- Configuration.cs 15 Apr 2004 13:21:17 -0000 1.11 *************** *** 173,177 **** private void Add(XmlDocument doc) { try { ! Binder.BindRoot( doc, CreateMappings() ); } catch (MappingException me) { --- 173,178 ---- private void Add(XmlDocument doc) { try { ! StringHelper.Dialect = Dialect.Dialect.GetDialect(properties); ! Binder.BindRoot( doc, CreateMappings(), StringHelper.Dialect); } catch (MappingException me) { |