Simon Green's Developer Blog
Developing .NET in the cold white north ...

CodeSmith templates for NHibernate Class / Mapping generation

Sunday, 4 December 2005 16:43 by Simon

Scott Beeler of AMD kindly sent some updates that he made to the original templates which include the following changes:

  • Fixed support for Many-to-Many relationships. These weren't handled correctly.
  • Improved naming of properties.
  • Added checking for lengths of strings to property set methods.
  • Automatic built-in support of the IComparable interface. It supports by-property, bidirectional sorting. This makes using an Nhibernate generated arraylist of objects easy to use as the datasource of something like a gridview where you want to enable bidirectional sorting of any column

Many thanks Scott !

This also addresses an enquiry someone raised about the use of cascade="all" in many-to-many mappings here: http://frazzleddad.blogspot.com/2005/12/nhibernate-many-to-many-confusion.html

The templates are available for download from http://www.intesoft.net/nhibernate/

 


Tags:   ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed