There's a tiny problem.... to support .NET 2.0 (which we do with NHibernate), we can't use partial methods, as they're added in .NET 3.5's compilers.
I think we can test for the target platform and if not .net 2.0, we're safe, and can emit the OnCreated() method (which is in line with what we have in linq to sql and EF).
There's also a bug on line 179, the include id is wrong, it should be SD_NHibernate_CustomEntityInclude. This fix will be released today.