-->
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.  [ 6 posts ] 
Author Message
 Post subject: Anyone know how to change mapping with the hibernate-tools-3
PostPosted: Wed Apr 13, 2005 7:46 pm 
Newbie

Joined: Wed Apr 13, 2005 7:38 pm
Posts: 3
Hi, I try to use the new tool hibernate-tools-3.0alpha1 to reverse engineering and generate the mapping and pojos. I want to map a smallInt db column to boolean in stead of short. Anyone knows how can I achieve that? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 1:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not in the latest release - it will arrive in the cvs version soon.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: How about reverse engineering selected tables or schema?
PostPosted: Thu Apr 14, 2005 12:49 pm 
Newbie

Joined: Wed Apr 13, 2005 7:38 pm
Posts: 3
Thanks for the quick response. When or how can I reverse engineering selected tables or schema?

When I try to reverse engineering derby db, it seems ok. However, when I try to reverse engineering oracle db, I got the exception of:

"Error under artifact generation

Reason:

org.hibernate.cfg.JDBCBinderException: org.hibernate.mapping.Column(OBJ_ID) already exist in org.hibernate.mapping.Table(null.DMSYS.DM_PHYSICAL_DATA)"

I think it try to reverse engineering all the system tables of oracle. What is the way I can tell the tool that I am only interested in my schema? Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 1:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
set default schema/catalong in your hibernate.cfg.xml

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: still get the error
PostPosted: Thu Apr 14, 2005 7:30 pm 
Newbie

Joined: Wed Apr 13, 2005 7:38 pm
Posts: 3
I have tried adding the following into hibernate.cfg.xml under session-factory:

<property name="hibernate.defaultSchemaName">UDC</property>
with or w/o catalog declaration:
<property name="hibernate.defaultCatalogName"></property>


But I still get the same error. Any clue? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 1:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read the docs to get the exact names:

http://www.hibernate.org/hib_docs/v3/re ... n-optional

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