These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hbm2dao for Stored Procedure Wrappers
PostPosted: Tue Jul 31, 2007 3:03 pm 
Newbie

Joined: Thu Jan 26, 2006 5:09 pm
Posts: 1
My apologies if this is a question already addressed somewhere, but my searches on the forum have not been fruitful. Before I ask my question let me sketch in some background...
My company has a C# solution, using Microsoft SQLServer stored procedures and Data Access Layer created by code generation tools: NetTiers and Codesmith. This generates DAOs with method calls to Stored Procedures - essentially wrappers to various CRUD-like Stored Procedures.

Because we have adopted a new tech direction, I am now considering hibernate/Java solution. Thus far, I have successfully used Middlegen/Hibernate (tools like <hbm2cfgxml/>, <hbm2java />, and <hbm2dao/>) to auto-generate a complete set of *.hbm.xml, DTOs, and DAO classes. To my surprise everything builds and runs successfully (I needed to tweak the hibernate-tool's ftl for adding a couple things). This code uses the normal table mapping and corresponding DAOs which use dynamic SQL, etc.

Naturally, I'm now asked to reproduce what we had done using the netTiers and Codesmith (for MS-SQL and Oracle). Although I can write the SP-access by hand, I need to know if the same Middlegen/Hibernate tools can be used to auto-generate the *.hbm.xml and DAO-wrapper classes that I need. One thought I had was to modify the hibernate-tool's ftl for this, but I'm not sure how to "detect" the stored procedures from database. Before I write a new hibernate tool extension, I need to know if there is an existing tool (such as <hbm2dao/>) for this? Has anyone successfully accomplished code generation for *.hbm.xml and DAO/stored proc wrappers with Hibernate? How???

Thanks.
-oxyale


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 02, 2007 4:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Nope ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.