-->
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.  [ 5 posts ] 
Author Message
 Post subject: middlegen + oracle
PostPosted: Thu Jul 28, 2005 1:25 pm 
Beginner
Beginner

Joined: Thu Jul 28, 2005 1:19 pm
Posts: 24
Hello

Forgive me if this is not the right forum to post my question. I am working with oracle10g and middlegen; the tool is not discovering my tables, it suggest that my schema does not contain anything. This is not true, I wrote a jdbc connection with java and used the getMetaData().getTables() and was able to read tables from my schema. Why middlegen has this problem. I start middlege with ant:

<middlegen appname="xxxx"
prefsdir="${basedir}"
gui="true"
databaseurl="jdbc:oracle:thin:@machine:1521:sid"
driver="oracle.jdbc.driver.OracleDriver"
username="username"
password="pass">

I think this is the right way to connect to oracle. If I add schema and catalog I get ORA-01424: error. Please advice


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 1:40 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
try add
schema="username"
catalog=""

regards


Top
 Profile  
 
 Post subject: Re: middlegen + oracle
PostPosted: Thu Jul 28, 2005 1:51 pm 
Beginner
Beginner

Joined: Thu Jul 28, 2005 1:19 pm
Posts: 24
It turned that Oracle will retuen tables with names starts with $ which will cause the problem. Can we exclude tables from the schema like:

<middlegen appname="xxx"
prefsdir="${basedir}"
gui="true"
databaseurl="jdbc:oracle:thin:@xxx:1521:xx"
driver="oracle.jdbc.driver.OracleDriver"
username="xxx"
password="xxx"
schema="xxx">
<table name="xxx.*"/>
<hibernate destination="${basedir}/src" package="xxxx"/>
</middlegen>

Thank You


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 2:05 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
You can do it.See table element, for example

<table name="tablename">

regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 8:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You might want to consider getting a CVS build as it has a number of fixes for various items. One being a minor patch for Oracle.


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