[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3968) Error in SchemaUpdate using HSQLDialect with BigInteger or BigDecimal primary keys [similar to HHH.3323]

Jonathan Mastin (JIRA) noreply at atlassian.com
Wed Jun 17 06:16:33 EDT 2009


Error in SchemaUpdate using HSQLDialect with BigInteger or BigDecimal primary keys [similar to HHH.3323]
--------------------------------------------------------------------------------------------------------

                 Key: HHH-3968
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3968
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.0.SP1
         Environment: HSQLDB: 1.8.0.9
            Reporter: Jonathan Mastin


Problem
---------------
When using HSQLDialect, the following code fails during schema creation:

@Entity
public class Test {
    @Id @GeneratedValue(strategy = GenerationType.AUTO)
    private BigInteger id;
}

Log output:
----------------
ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table Test (id numeric generated by default as identity (start with 1), primary key (id))
ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Wrong data type: id in statement [create table Test (id numeric generated by default as identity (start with 1)]


Expected
---------------------------------
The column type is being set as "numeric", but it needs to be set as "integer" or "bigint" for HSQL to be able to parse.

>From the HSQL manual:
"The supported form is(<colname> INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH n, [INCREMENT BY m])PRIMARY KEY, ...). Support has also been added for BIGINT identity columns. As a result, an IDENTITY column is simply an INTEGER or BIGINT column ..."


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list