-->
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.  [ 4 posts ] 
Author Message
 Post subject: postgre and reverse engineering: problem with domains
PostPosted: Sun Aug 03, 2008 12:18 pm 
Newbie

Joined: Sun Aug 03, 2008 10:52 am
Posts: 2
Hi!
I have defined some domains in my postgre database and use them in different columns as datatypes.

In the hibernate-configurations-view in eclipse these columns have set "DISTINCT" as a datatype. (So I think the hibernate-tools can't recognize the column-types correctly)

When I try to reverse engineer the database, the corresponding fields for the columns in the java-files are of type serializable.

My Problem is that these fields should be of the type String or Date,...

I tried to configure the sql-type mappings with a reveng.xml but when I define:
Code:
<sql-type jdbc-type="DISTINCT" hibernate-type='String'></sql-type>

but the problem is that every (domain) field has "String" as datatype, but I use different types for my domains...

has anyone a sollution?

Hibernate version: 3.2.6ga or 3.3.0 CR1

hibernate-tools 3.2.2 Beta1

Postgre SQL 8.2.7


I don't want to define the sql/hibernate-types manually for the columns because there are over 100 Tables in this database...

Thanx in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 4:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you would have to depend on db specific type name I guess....that is not yet implemented though ;(

the idea is for users to be able to specify a native-type next to the jdbc-type which would match on the database specific type name column.

patches welcome!

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 12:27 pm 
Newbie

Joined: Sun Aug 03, 2008 10:52 am
Posts: 2
I 've no deleted my domains and set the datatypes manually like

Code:
[...]  "vorname" character varying(50), [...]


now reverse engineering works for this type and uses in java files String as datatype.

but when I use Date or Timestamp as Type in my Columns the java types are Serializeable.

and when I open my database in the hibernat-configurations-view to see the tables, columns with these types are showing "DISTINCT" as Datatype...

I 've tested this with different jdbc drivers for postgre,... always the same.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 2:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sounds like postgressql db or driver is not very focused on returning quality metadata ;(

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