-->
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.  [ 3 posts ] 
Author Message
 Post subject: Schemaexport doesn't produce valid SQL
PostPosted: Sun Feb 22, 2004 5:15 pm 
Regular
Regular

Joined: Sat Oct 11, 2003 11:13 am
Posts: 69
I switched to HSQL DB, but something is troubling me.

The schemaexport produces a SQL script. I just quote a part:

Code:
create table Address (
   address_id BIGINT NOT NULL IDENTITY,
   city VARCHAR(255),
   country BIGINT,
   postalCode VARCHAR(255),
   stateProvince VARCHAR(255),
   street VARCHAR(255),
   person_id BIGINT
);


The logger tells me:
ERROR SchemaExport - Unsuccessful: create table Address (address_id BIGINT NOT NULL IDENTITY, city VARCHAR(255), country BIGINT, postalCode VARCHAR(255), stateProvince VARCHAR(255), street VARCHAR(255), person_id BIGINT)

If I execute this statement by myself, I get this error message in DBVisualizer:
Wrong data type: ADDRESS in statement [SET MAXROWS 500;create table Address ( address BIGINT NOT NULL IDENTITY, city VARCHAR(255), country BIGINT, postalCode VARCHAR(255), stateProvince VARCHAR(255), street VARCHAR(255), person_id BIGINT )]

My db.properties look like this:
Code:
#HSQL database
#Sun Feb 22 22:02:49 CET 2004
sql.strict_fk=true
readonly=false
sql.strong_fk=true
hsqldb.version=1.7.1
version=1.7.1
hsqldb.cache_scale=14
sql.compare_in_locale=false
sql.month=true
hsqldb.log_size=200
modified=no
hsqldb.cache_version=1.7.0
hsqldb.original_version=1.7.1
hsqldb.compatible_version=1.7.0
sql.enforce_size=false


My hibernate.cfg.xml file looks like this (just a part):
Code:
    <session-factory>
        <property name="connection.url">jdbc:hsqldb:database/liberty.db</property>
        <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
        <property name="connection.username">SA</property>
        <property name="connection.password"></property>
        <property name="show_sql">true</property>
        <property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>


Whats the reason for the problem? It seems to me that schemaexport produces invalid SQL for HSQL.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 5:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There is a bug in hsql, use the version in the hibernate CVS. http://forum.hibernate.org/viewtopic.php?t=926427&highlight=hsql+bigint


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 5:38 pm 
Regular
Regular

Joined: Sat Oct 11, 2003 11:13 am
Posts: 69
It helped.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.