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.

Print | posted on Tuesday, March 20, 2007 9:58 AM

Feedback


Gravatar

# re: NHibernate code generation 3/20/2007 8:29 PM Adam Tybor

How does it handle sub-classes?


Gravatar

# re: NHibernate code generation 3/22/2007 3:17 PM Sean McCormack

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


Gravatar

# re: NHibernate code generation 3/23/2007 6:03 AM Tom Opgenorth

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.


Gravatar

# re: NHibernate code generation 3/27/2007 7:47 AM nimble99

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

Comments have been closed on this topic.