Hi All,
I'm starting a new project in C#, and I'm thinking of using NHibernate. We currently have a lot of Java code that uses Hibernate mapping files, and I was trying to re-use these hbm files in my C# code. However, the files differ in several ways, such as:
* The classnames are different (my.java.package.Foo vs. my.csharp.namespace.Foo)
* We're using Oracle, and NHibernate requires that all string properties be marked with " type="AnsiString" ", whereas the Java Hibernate does not require this (and thus the Java mapping files do not have these tags).
* There are probably other differences I haven't found yet
So, what would you suggest ? Is it a good idea at all to share mapping files between Java and C# ? If so, how should I approach it -- should I write some sort of a script that rewrites them for me, and then sync it every time someone updates a mapping on the Java side ? That doesn't sound particularly robust, so I'm hoping for a better solution...
|