-->
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: Two quick questions
PostPosted: Wed Mar 28, 2012 12:50 pm 
Newbie

Joined: Tue Feb 14, 2012 11:58 pm
Posts: 7
I posted these in the general users section but then realized that I should probably post here instead since the second question is specifically about tools:

1. Is it correct that, if I use the .hbm.xml mapping files, I do not have to create POJOs for my tables?

2. Is there a way to use Eclipse to automatically generate the Action and Manager classes, similar to the way it will generate the model classes and .xml mapping files, or do I have to do those by hand?


Thanks!


Top
 Profile  
 
 Post subject: Re: Two quick questions
PostPosted: Mon Apr 02, 2012 8:33 am 
Senior
Senior

Joined: Fri May 08, 2009 12:27 pm
Posts: 168
1) If you activate the "Domain code" exporter, then yes you'll get entity classes.
That's independent of whether you use .hbm.xml or annotations, by the way.
Be warned that the reveng process is hard to control, does not cover all cases, and is a bitch to adapt to new requirements. For my current project, reveng has eaten far more time than it could ever save; in 20/20 hindsight, I know I should have used hand-written Pojo classes, with EJB annotations, and have them checked for consistency with the RDBMS via unit tests. YMMV.

2) The Action and Manager terminology seems to be related to Spring/Struts. Hibernate Tools is not related to these, and I don't think it can generate them out of the box.
It may be possible to make reveng generate these as well, but then maybe it cannot. Finding out whether it's possible is going to take person-months unless you're already a Hibernate Tools expert, so that's probably not your route anyway.


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.