Welcome to the CodeSmith Community!

Re: Generate from HBM files with no database backend

Support Forums

Feel free to ask any questions about CodeSmith here.

Generate from HBM files with no database backend

Answered (Verified) This question is answered


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?


David L.

  • Post Points: 35
Verified Answer
  • 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

All Replies
Page 1 of 1 (4 items)