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.