-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Tools - Trying to generate hbm.xml files
PostPosted: Tue Oct 02, 2007 12:57 am 
Newbie

Joined: Tue Oct 02, 2007 12:47 am
Posts: 3
Hi,

I just grabbed the latest copy of Eclipse 3.3.0 and Hibernate Tools 3.2.0.beta9a. To see how the generator worked, I just created a couple of POJOs in a project and the hibernate.cfg.xml. Then I went to the "Hibernate Code Generation..." wizard. So, what I want is the hbm.xml files that correspond to my 2 POJOs. So, I select a console configuration, select an existing output directory, and then check "Hibernate XML Mapping (.hbm.xml)" under the Exporters tab. When I click the "Run" button, nothing happens; nothing gets generated. When I try the "Hibernate XML Configuration (cfg.xml)" exporter instead, it copies my existing hibernate.cfg.xml to the output directory, so it does look like I have it configured somewhat correctly. I just can't get it to generate the hbm.xml files for me.
Nothing shows up in the hibernate error log in Eclipse either...
Any ideas about what I'm doing wrong?

Kevin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 02, 2007 3:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Generating HBMs from the database, eg, reveng is supported. Only from a POJO you require some form of markup, eg, Xdoclet tags == xdoclet to generate the HBMs.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 02, 2007 9:50 am 
Newbie

Joined: Tue Oct 02, 2007 12:47 am
Posts: 3
thanks David...
Since I've never "decorated" my POJOs before in this way, what's the suggested/recommended way? XDoclet? others?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 02, 2007 7:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
XDoclet if you cannot use Annotations otherwise use Annotations - then you do not need to generate HBMs at all.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.