Thread:
 About Type Mapper in Oracle 
 ojik   07 Apr 2005, 00:22 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: ojik (07 Apr 2005, 00:22) Replies: 0, Views: 37708
Subject: About Type Mapper in Oracle
Hibernate version: 2.0 
Middlegen-Hibernate version: R-5 
Name and version of the database you are using:Oracle 9i 
The generated SQL (show_sql=true):True 

Hi,.. I Just got some problem from XBM Generated by Middlegen, 

In the oracle table description look like this : 

SQL> desc systlogin; 
Name Null? Type 
----------------------------------------- -------- --------------------
------- 
SYSTLOGIN_PK NOT NULL NUMBER(38) 
SYSTROLE_FK NUMBER(38) 
CUSTOMER_FK NUMBER(38) 
LOGINID NOT NULL VARCHAR2(10) 
NAMA VARCHAR2(50) 
ATASAN NUMBER(38) 
PASSWORD VARCHAR2(20) 
LANGUAGE VARCHAR2(2) 

Look at this,.. 
SYSTLOGIN_PK NOT NULL NUMBER(38) <--- its was Integer in Oracle PL/SQL 


The Question is : WHY everytime i try to generate XBM from this table 
its produce UNEXPECTED type of Data, Middelegen will produce XBM type 
data to BIGDECIMAL..In this case i want Middlegen to produce 
SYSTLOGIN_PK type data to INTEGER 

Systlogin.xbm.xml similar look like this : 

<class 
name="com.latih.db.Systlogin" 
table="SYSTLOGIN" 
>

<id 
name="systloginPk" 
type="java.math.BigDecimal" 
column="SYSTLOGIN_PK" 
>
<generator class="native" /> 
</id> 

Anyone can figure me out ? Thanks,..
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]