NHibernate code generation
Bobby Diaz has sent me the results of running the NHibernate Plugin for Visual Studio 2005 over the Northwind database, and I must say that they are good. Not perfect, but good.
Another template that was recommended to me by Steve was MyGeneration "NHibernate lujan99 - .08" template, which I need to check.
Comments
How does it handle sub-classes?
I'd also recommend looking at Codus NHibernate template. It not only generates all the classes and hbm files, but also a set of unit tests:
http://www.adapdev.com/codus
I don't suppose you've had a chance to try the "NHibernate lujan99 - .08" template? I've been trying it with NHibernate 1.2 RC1. Not much luck. Then again, it could just be me.
Sub classes are identified by a foreign-key relationship between 2 tables where both keys are the primary keys of their owner tables.. however this is also the relational prototype for one-to-one relationships, so you will need to tell the diagram whether it is generalization, or aggregation that you intend.
You do this by right clicking on the relationship connector, and selecting "Make subclass" from the popup menu.
HTH
Comment preview