Hi,
I'm having some trouble with hbm2net following a change from Contrib-0.7.0.0 to Contrib 0.8.4.0 and would be grateful for any input
Firstly, I'm getting an issue with the xmlns declaration in the mapping file.
If my .hbm.xml file contains a namespace declaration like this:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
My class is not generated where it would have been using 0.7.0.0.
I had a look into the code and think it's related to the following type of code changes in CodeGenerator.cs
0.7.0.0:
Code:
IEnumerator classElements = rootElement.SelectNodes("urn:class", nsmgr).GetEnumerator();
0.8.4.0
Code:
IEnumerator classElements = rootElement.SelectNodes("class", nsmgr).GetEnumerator();
With 0.8.4.0, classElememts comes back empty. If I change this line back to match 0.7.0.0 and recompile, my class is generated again.
I also find if I remove the namespace declaration and successfully generate a .cs class using 0.8.4.0, when I later try to load the mapping in NHibernate i get an XML validation schema error for <hibernate-mapping> - so I'm sure the declaration is required at application runtime.
My Second problem is with declaring the assembly in a class name.
For with example the class declaration
Code:
<class table="File" class=MyNamespace.File, MyAssembly">
hbm2net tries to generate a file called MyNamespace\File, Myassembly.cs.
At runtime, NHibernate will not find my class without declaring the Assembly.
Contrib-0.7.0.0 doesn't have this issue - it generates MyNamespace\File.cs
Thanks for any info you can provide on the changes between these versions.