Scott Beeler of AMD kindly sent some updates that he made to my original NHibernate/Codesmith 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 ... usion.html
The templates are available for download from
http://www.intesoft.net/nhibernate/