-->
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: Oracle SchemaUpdate problem/bug ?
PostPosted: Mon Jun 30, 2008 10:16 am 
Newbie

Joined: Mon Jun 30, 2008 9:59 am
Posts: 1
Dear Hibernate admins & forum users,

I have a problem with Oracle and SchemaUpdate tool. I think that I isolated the problem very precisely. I am trying to map a binary field with a default value "true". This mapping works with PostgreSQL and MySQL but fails with Oracle. The exact problem is theat SchemaUpdate tries to run the following query:

Code:
create table nova_gateway_t (gateway_id number(10,0) not null, enabled number(1,0) default true,  primary key (gateway_id))


The problem lies with the "true" default value. In this case, since hibernate changed the physical column type to number(1,0), shouldn't it also change the default value to 1 ?

Thank you in advance for your help.

Hibernate version: 3.2.5.ga

Mapping documents:


Code:
<class name="com.aginova.storage.Gateway" table="nova_gateway_t">
  <id name="gateway_id" type="integer" unsaved-value="null">
   <column name="gateway_id" length="10" not-null="true"/>
   <generator class="increment"/>
  </id>

   <property name="enabled" type="boolean">
   <column name="enabled" not-null="false" default="true"/>
  </property>
</class>


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

Actually before that:

Code:
new SchemaUpdate(configuration).execute(true, true);


Full stack trace of any exception that occurs:

Quote:
2008-06-30 15:43:25,406 ERROR [HTTPThreadGroup-4] (SchemaUpdate.java:155) - Unsuccessful: create table nova_gateway_t (gateway_id number(10,0) not null, enabled number(1,0) default true, primary key (gateway_id))
2008-06-30 15:43:25,406 ERROR [HTTPThreadGroup-4] (SchemaUpdate.java:156) - ORA-00984: Un nom de colonne n'est pas autorisé ici


Name and version of the database you are using:

Oracle Database 10g Express Edition Release 10.2.0.1.0

The generated SQL (show_sql=true):

N/A

Debug level Hibernate log excerpt:

N/A


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.