Howdy,
I'm wondering if there is a way to generate the hbm's by hand and still have codesmith generate the rest of the code? I have some oracle databases that I have to connect to but I only "execute" rights on the stored procs I call in these databases ... so when I point the oracle provider at the database and try and generate I get nothing.
It's easy enough to generate the hbm files for these stored proc's which I've done and added to the Maps/Functions folder. But when I try and generate I get nothing.
Is there anyway to generate these projects?
Thanks
David L.
Hello,
If you take a look at the code for CodeSmith.SchemaHelper.NHibernate. You can see that it tries to parse every document in the specific entities and functions folder. However, if you look at the different classes like NHibernateCommandEntity and ..CommandProperty you will see that its looking for specific xml attributes. As long as these attributes are defined (they don't have to exist in the db), the entity will be generated. One could patch this to not even check those attributes but since they are required by nHibernate, one should probably enforce they exist.. The quickest way to ensure this would be to copy an existing function hbm.
Blake Niemyjski CodeSmith Tools, LLC. Software Development Engineer Blog: http://windowscoding.com/blogs/blake/ .NetTiers team | Visit http://www.nettiers.net
If you are using the PLINQO for nHibernate templates then these stored procedures should be generated automatically from the hbm files. Is this what you are doing?
Blake,
yes it is ... but it looks like because it doesn't see any objects in the database it ignores the files I placed in the Maps\Functions folder.
dbl