Search code examples
c#nhibernatemygeneration

hbm.xml file how do I build against a template ([email protected]) to generate class files


I have inherited a project that has not been worked on for a while and I need to make some changes. The original developer is not here any more (deceased)(he also did no documentation) and no one else knows anything about it.

The project is using NHibernate as an ORM. The project contains lots of hbm.xml files.The hbm.xml file has the following in it:

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <!--Build: with [email protected] Nhibernate template-->

There are some class files with the following in it:

/*
using MyGeneration/Template/NHibernate (c) by [email protected]
*/

So it looks like I need to use a toll called MyGeneration with the tempalte created by [email protected].

I have found the template file (http://www.mygenerationsoftware.com/TemplateLibrary/User/?guid=a5ee6a14-d362-4abe-92db-239b0bc8207c).

I have hooked MyGeneration to my DB(Oracle) and it can see the database.

I don't know how I use the hbm.xml against the template to generate the cs files.


Solution

  • The hbm files are not a template to generate classes! They are NHibernate mappings! They are used to indicate NHibernate how to create a class from ddbb data.