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