-->
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.  [ 12 posts ] 
Author Message
 Post subject: two important question!
PostPosted: Fri Aug 26, 2005 8:10 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
two very import question!
hi every one!
1.i use hibernate tools to a old system,when hibernate create java code and hbm files,the hibernate tools need all tables has a primary key(if not ,hibernate tools will tell me a primary key error!)
2.when i write a Console Configuration,the hibernate tools use all JDBC metadata to produce the java and hbm files,but i want not this,i only want part of JDBC metadata(not all JDBC metadata).can i choose the JDBC metadata i want to produce ?(myeclipse can do this)

thanks for you help!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 8:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
see tools.hibernate.org for the updated version which allow you to create a reveng.xml via a wizard to allow you select relevant tables.

and yes, all mappings need you to map some <id> as otherwise we can not know how to distinguish objects.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: read total all JDBC metadata cost too much time!
PostPosted: Fri Aug 26, 2005 8:22 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
read total all JDBC metadata cost too much time!hibernate tools 5 can do some filter?????

not read all JDBC metadata,i only want to choose the JDBC metadata i want to use!!!!!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 8:25 am 
Hibernate Team
Hibernate Team

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

read the docs!!!!!

did you try out the examples????

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: thanks for you help!
PostPosted: Fri Aug 26, 2005 9:55 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
hi,i write a xml file to filter the useless jdbc metadata
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
  <table-filter match-schema="430100" match-name="JBXX"/>
  <table-filter match-schema="430100" match-name="SZXH"/>
</hibernate-reverse-engineering>


but when i make hibernate artifact generation(i had setup the reverse engineering file),the screen lock,just like i had not setup the reverse engineering file at all!

sorry,i use hibernate tools first time!!i use myeclipse before!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 9:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you click the setup button ?

you need to add a exclude filter at the bottom of the list to state you dont want everything from the db.

e.g.
<table-filter match-name=".*" exclude="true"/>


/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: thanks for you help!
PostPosted: Fri Aug 26, 2005 10:03 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
if i click setup buttom,the configure table fiters still lock!can you speed it up?

too slow!

thanks for you help!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 10:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you could set the default schema/catalog then it would only list those.

How big a database are you actually using ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: by the way,i had the other question!
PostPosted: Fri Aug 26, 2005 10:18 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
http://forum.hibernate.org/viewtopic.ph ... highlight=

i use oracle 8.1.5 in aix4.3,many tables in my system!!!


Top
 Profile  
 
 Post subject: after a long time.....i get the error!
PostPosted: Fri Aug 26, 2005 10:22 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
error under artifact generation

reason:
org.hibernate.exception.genericJDBCException:Problems getting meta data for primary keys

first ,i set reverse-engineering,the speed should not be so slow!!
second,after a long time,i get the error message

Code:
error under artifact generation

reason:
org.hibernate.exception.genericJDBCException:Problems getting meta data for primary keys


what the mean for this error code?

thanks a lot


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 26, 2005 10:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please stop putting all those !!!!! its annoying to read!!!!!!

then set the default schema/catalog and add a table-filter that excludes everything - then it will not scan through anything besides what you have included.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: sorry
PostPosted: Fri Aug 26, 2005 10:25 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
sorry


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