I made a plugin for MiddleGen awhile back to generate NHibernate hbm.xml files from the database schema. I design the database -> use migglegen with nhibernate plugin for the hbm.xml -> hbm2net for c# class gen. I updated it a bit. Hope it works for you.
Heres the sample task you need to put in your ant file.
http://www.coolniche.com/middlgen-nhibernate-plugin-0.5.zip
<middlegen
......
>
<table name="AppUser"/>
......
<nhibernate
destination="${build.gen-src.dir}"
package="${name}.${tier-namespace}"
assembly="${name}">
<hibernateDAO getHibernateSession="MySessionFactory.OpenSession();"/>
</nhibernate>
</middlegen>