I used a free code generation tool called MyGeneration to do this before (
http://www.mygenerationsoftware.com/portal/default.aspx).  It even comes with a template for this that will create the class files and the hbm mapping files.  
I heavily modified it before I used it to take advantage of .NET 2.0 generics and partial classes.  Basically I split each class into two partial class files, one for business logic (i.e. hand edited code) and one for generated code (that contained the mapped properties).