-->
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.  [ 49 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Hibern8 IDE for Hibernate 3.0
PostPosted: Mon Apr 18, 2005 3:34 pm 
Beginner
Beginner

Joined: Fri Apr 15, 2005 4:53 pm
Posts: 29
Hi,
I was just wonderin if there is a Hibernate IDE for 3.0 yet.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 9:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The hibernate eclipse plugin's (with JBoss IDE) is the GUI tool kit for Hibernate 3.0 . Its under active development, get eclipse 3.1M6 and get latest JBoss IDE for a test run.


Top
 Profile  
 
 Post subject: Hibernate reverse engineering error using Eclipse
PostPosted: Tue Apr 19, 2005 3:40 pm 
Newbie

Joined: Tue Apr 19, 2005 3:08 pm
Posts: 4
I am using Eclipse 3.1M6 with the JBoss IDE-1.5M1-Hibernate-Tools with Oracle 10g as my database. When trying to reverse engineer the "scott" schema from oracle, I get the following error under artifact generation:

Reason: org.hibernate.exception.GenericJDBCException:Getting database metadata.
I have added classes12.jar in the hibernate console configuration.

Here is my hibernate.cfg.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="test">
<property name="hibernate.connection.username">scott</property>
<property name="hibernate.connection.password">tiger</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject: help in reverse engineering
PostPosted: Tue Apr 19, 2005 4:59 pm 
Newbie

Joined: Tue Apr 19, 2005 3:08 pm
Posts: 4
Doing reverse engineering against "scott" using Eclipse 3.1M5, Oracle 10g and JBoss IDE 1.5M1. Now, I am getting the following error after changing my hibernate.cfg.xml to have the following line using the loopback adapter:

<property name="hibernate.connection.url">jdbc:oracle:thin:@10.10.10.10:1521:orcl</property>

Error under artifact generation

Reason:
org.hibernate.cfg.JDBCBinderException:org.hibernate.mapping.Column(AO_OBJ_ID) already exist in
org.hibernate.mapping.Table(DMSYSDM_APPLY_CONTENT_ITEM)

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 6:25 pm 
Try adding the following line in your configuration file (.cfg.xml)
<property name="hibernate.default_schema">scott</property>

HTH.


Top
  
 
 Post subject: reverse engineering
PostPosted: Wed Apr 20, 2005 11:19 am 
Newbie

Joined: Tue Apr 19, 2005 3:08 pm
Posts: 4
sjanarthanan@tomax.com wrote:
Try adding the following line in your configuration file (.cfg.xml)
<property name="hibernate.default_schema">scott</property>

HTH.


I did that and it and it generates the file "GeneralHbmSettings.hbm.xml" but no POJO's are generated for the scott schema.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
for General Global Setttings
-->


</hibernate-mapping>

Any other suggestions?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 11:21 am 
Hibernate Team
Hibernate Team

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

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 11:36 am 
Newbie

Joined: Tue Apr 19, 2005 3:08 pm
Posts: 4
max wrote:
try SCOTT


Works!

Thanks


Top
 Profile  
 
 Post subject: Re: help in reverse engineering
PostPosted: Wed Apr 20, 2005 2:52 pm 
Beginner
Beginner

Joined: Fri Apr 15, 2005 4:53 pm
Posts: 29
vbhatt wrote:
Doing reverse engineering against "scott" using Eclipse 3.1M5, Oracle 10g and JBoss IDE 1.5M1. Now, I am getting the following error after changing my hibernate.cfg.xml to have the following line using the loopback adapter:

<property name="hibernate.connection.url">jdbc:oracle:thin:@10.10.10.10:1521:orcl</property>

Error under artifact generation

Reason:
org.hibernate.cfg.JDBCBinderException:org.hibernate.mapping.Column(AO_OBJ_ID) already exist in
org.hibernate.mapping.Table(DMSYSDM_APPLY_CONTENT_ITEM)

Thanks


While reverse engineering should we select the join tables during mapping files generation or should we leave'em out?


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 3:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
dont know what you mean ;)

in the alpha 1 version you cannot select stuff...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Any plans to support "Selecting" tables in the fut
PostPosted: Wed Apr 20, 2005 4:12 pm 
Newbie

Joined: Wed Apr 20, 2005 12:29 pm
Posts: 1
Max,

Do you have any plans to support "selecting" tables in the Hibernate Artifact Generation - during "Reverse Engineer from JDBC Connection".

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 4:16 pm 
Hibernate Team
Hibernate Team

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

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 8:32 pm 
Beginner
Beginner

Joined: Fri Apr 15, 2005 4:53 pm
Posts: 29
max wrote:
dont know what you mean ;)

in the alpha 1 version you cannot select stuff...


Max,
I was playing around with http://hibernatesynch.sourceforge.net/ and this plugin lets me select the tables.

But I've another question. Using middlegen to generate hbm files from the database. But middlegen generates mapping files for the join tables (used to resolve many-to-many relationship) as well.

For example: table Album, table Track, table ALBUM_TRACK

table ALBUM_TRACK has
id (pri key)
album_id (fr key)
track_id (fr key)


So is it a good idea to have the mapping files and POJO for those joint tables or should i delete those mapping files and POJOs and edit the associations in hbm files manually?

Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 11:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Middlegen allows you to select if the join tables are generated or not for Many-to-many. This is done with the appropriate Ant tags and settings. See Middlegen docs for further information.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 6:52 pm 
Beginner
Beginner

Joined: Fri Apr 15, 2005 4:53 pm
Posts: 29
david wrote:
The hibernate eclipse plugin's (with JBoss IDE) is the GUI tool kit for Hibernate 3.0 . Its under active development, get eclipse 3.1M6 and get latest JBoss IDE for a test run.


Is there an easy way to make all the properties to have the first char in lowercase? Right now it generates all the properties with first char in uppercase.

For example, it generates:
<property
name="CcNumber"
type="java.lang.String"
>
instead of
<property
name="ccNumber"
type="java.lang.String"
>

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 49 posts ]  Go to page 1, 2, 3, 4  Next

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.