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: How to change default SQL types generated by schema export ?
PostPosted: Fri Sep 24, 2004 8:39 am 
Newbie

Joined: Thu Sep 23, 2004 1:57 pm
Posts: 6
Is it possible to change default SQL types generated by schema export tool?.

I have some problems with SQL Server.:

1. for
Code:
BigDecimal
I got
Code:
numeric(19,255)
and I want
Code:
numeric(12,2)

2. for
Code:
binary
mapping type I got
Code:
varbinary(255)
and I want
Code:
image


I know I can change SQL type using "column.sql-type" but I do not want my mapping files db-specific, so I would prefere to change default sql-types for specific SQLDialect.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 24, 2004 9:08 am 
Newbie

Joined: Thu Sep 23, 2004 1:57 pm
Posts: 6
... and more:

3. for every class attribute which type is another Java class that implement Serializable I got
Code:
varbinary(255)
and exceptions inserting to database so I have to change it to
Code:
image
SQL Server type in database


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 24, 2004 9:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Please read the Hibernate documentation. All is very well-covered there.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 24, 2004 10:32 am 
Newbie

Joined: Thu Sep 23, 2004 1:57 pm
Posts: 6
I did. And "Hibernate in Action" too. And forum archives. And Google

Please, ANY hint where should I look for solution ... maybe I got blind by too many hours in front of monitor? ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 12:04 pm 
Beginner
Beginner

Joined: Tue Jan 18, 2005 9:37 am
Posts: 29
Location: The Netherlands
Have you figured this out yet?

I think you have to programmatically edit the net.sf.hibernate.dialect TypeNames object, or create your or dialect.


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.