-->
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.  [ 1 post ] 
Author Message
 Post subject: No Dialect mapping for JDBC type: 3 error with DB2
PostPosted: Wed Aug 09, 2006 8:37 am 
Newbie

Joined: Wed Aug 09, 2006 7:37 am
Posts: 1
Location: Munich / Germany
Hi,
according to a previous posting http://forum.hibernate.org/viewtopic.php?t=959583&highlight=mapping+jdbc+dialect+oracle I subclassed DB2Dialect and extended the constructor to:
Code:
super();
// enable Decimal type in Hibernate SQLQueries
registerColumnType(Types.DECIMAL, "number($p,$s)");
registerHibernateType(Types.DECIMAL, "big_decimal");
// enable Decimal function in Hibernate Queries
registerFunction("decimal", new StandardSQLFunction("decimal", Hibernate.BIG_DECIMAL));


This way it works but two questions arose:
    Is it the recommended way to enable Decimal type and function?
    What's the reasons why these type/function is not included in DB2Dialect (maybe I will run into problems in the future)?

Thanks
Walter

p.s.
Hibernate version: 3.1.1
Name and version of the database you are using:DB2 UDB 8.2

extract of hibernate.cfg.xml:
Code:
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.