-->
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.  [ 8 posts ] 
Author Message
 Post subject: Hibern8IDE Plugin - fails to reverse engineer artifacts
PostPosted: Mon Jun 27, 2005 11:41 pm 
Beginner
Beginner

Joined: Fri Feb 20, 2004 6:15 pm
Posts: 38
Hello,

I just installed H8IDE in Eclipse 3.1RC3. I have a very simple MySQL schema I'm using to test out the reverse engineering.

I created a new console configuration and added the MySQL driver to the classpath. That works ok. I can then do a "create SessionFactory" on that console configuration.

However, when I then do a new hibernate artifact generation, nothing gets reverse engineered. It exits and puts two files in the output directory, the hibernate.cfg.xml and the GeneralHbmSettings.hbm.xml, but no mappings are generated or anything like that.

The connection parameters that are put in the cfg.xml are correct, so it should be accessing the DB. I get no errors.

Am I doing something wrong, or can someone help me out?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 1:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
for some reason the mysql driver is not reporting any tables.

do you have the proper rights ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 8:14 am 
Beginner
Beginner

Joined: Fri Feb 20, 2004 6:15 pm
Posts: 38
Yes, I'm connecting to the DB as root so I should have all permissions.

Is there anything I can do to help provide more information, like logging what is happening?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 10:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use it through ant, configure log4j (by adding a log4j.properties or log4j.xml) to the classpath of the hibernatetool and check the log for JDBCBinder stuff

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 3:27 pm 
Beginner
Beginner

Joined: Fri Feb 20, 2004 6:15 pm
Posts: 38
max wrote:
use it through ant, configure log4j (by adding a log4j.properties or log4j.xml) to the classpath of the hibernatetool and check the log for JDBCBinder stuff


Thanks, this helped. It shows that my tables did not have primary keys (I was using a sample schema with just 3 tables) so it did not generate the classes for those tables.

It generated the classes and mappings. I don't agree with some of the mappings, but I guess that's why you can override the reverse engineering strategy!

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 3:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you are using the latest tools it will generate a composite key with all your columns

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 6:33 pm 
Beginner
Beginner

Joined: Fri Feb 20, 2004 6:15 pm
Posts: 38
max wrote:
if you are using the latest tools it will generate a composite key with all your columns


I was using the latest released version 3a4 and it didn't auto-create a key like that.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 1:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm....it should ,)

_________________
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.  [ 8 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.