-->
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: hbm2ddl can not create sql if big_decimal is specified
PostPosted: Wed Feb 09, 2005 5:06 am 
Newbie

Joined: Wed Feb 09, 2005 1:17 am
Posts: 2
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:2.1.7c

Mapping documents:
Code:
<?xml version="1.0" encoding="EUC-JP"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping default-cascade="all" package="jp.co.test">
  <!--
  Rating
  -->
  <class name="Test" table="test" dynamic-update="true"
    optimistic-lock="version">
    <cache usage="read-write"/>

    <id name="piid" type="long" column="piid">
      <generator class="native"/>
    </id>
    <version name="version" column="version"/>
    <property name="modificationDate" type="timestamp"
      column="modification_date"/>
    <property name="price" type="big_decimal" column="price"/>
  </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:Oracle10g

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


When creating DDL from a mapping file using hbm2ddl,
if a big_decimal type is specified, the error of ORA-01728 will occur.

big_decimal is changed into NUMBER (19,255)

Is this a bug?

following is DDL which created by hbm2ddl

Code:
drop table test cascade constraints
drop sequence hibernate_sequence
create table test (
   piid number(19,0) not null,
   version number(10,0) not null,
   modification_date date,
   price number(19, 255),
   primary key (piid)
)
create sequence hibernate_sequence


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.