Hi
I have following table in hsqldb 1.7.3 :
Code:
CREATE TABLE Company
(
CompCode INTEGER identity,
CompName VARCHAR(100) NOT NULL,
PRIMARY KEY (CompCode)
);
and following hibernate.reveng.xml :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="CHAR" hibernate-type="string" length="1">
</sql-type>
<sql-type jdbc-type="INTEGER" hibernate-type="java.lang.Integer">
</sql-type>
</type-mapping>
</hibernate-reverse-engineering>
The generated hmb file is :
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 17 sept. 2006 18:42:43 by Hibernate Tools 3.2.0.beta6a -->
<hibernate-mapping>
<class name="com.hmoser.repo.Company" table="COMPANY">
<id name="compCode" type="java.lang.Integer">
<column name="COMPCODE" />
<generator class="assigned" />
</id>
<property name="compName" type="string">
<column name="COMPNAME" length="100" not-null="true" />
</property>
</class>
</hibernate-mapping>
I was expecting : generator class="
identity".
Am I missing something ?