-->
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: Bigint = String?
PostPosted: Mon Mar 26, 2007 8:39 am 
Newbie

Joined: Mon Mar 19, 2007 7:34 am
Posts: 3
Hello,

because of my project for the final exam I must learn Hibernate. Now I have already created a few tables, but I realised that if I create a table as it follows, I never get the type varchar, or char, but always Bigint..

Code:
   <class name="User" table="cf_user">
      <id name="u_Nr" type="long">   </id>
      <property name="u_name" type="java.lang.String">
         <column name="U_NAME" sql-type="varchar(25)" not-null="false" />
      </property>
      <property name="u_Kurzz" type="java.lang.String">
         <column name="U_KURZZ" sql-type="varchar(6)" not-null="false" />
      </property>       
      <property name="u_Tele" type="java.lang.String">
         <column name="U_TELE" sql-type="varchar(20)" not-null="false" />
      </property>             
      <property name="u_KOST" type="integer" />
      <property name="u_Email" type="java.lang.String">
         <column name="U_Email" sql-type="varchar(50)" not-null="false" />
      </property>       
   </class>


I also tried
Code:
<property name="u_Email" type="string" />   
<property name="u_Email" />   

with the same result.

Actually that wouldn't disturb me. I can still insert data as usual, but if I try to update it in Eclipse, I always get these errormessage

Code:
update "DB"."USER" set "U_VORNAME"='Laverna' where "U_NR"=CAST(29609 AS BIGINT)

java.sql.SQLException: ORA-00902: Invalid  Datatype


Error saving data


Can somebody please tell me the reason?

Greetings
Christina


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.