[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3323) Error in SchemaUpdate using HSQLDialect with non Integer or Long primary keys

Martin Backhaus (JIRA) noreply at atlassian.com
Tue Jun 3 11:25:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30320 ] 

Martin Backhaus commented on HHH-3323:
--------------------------------------

"must be of INTEGER or BIGINT" < - > "id smallint"

Try Integer or Long. 
32767 (Short.MAX_VALUE) entities may be anyway not enough

> Error in SchemaUpdate using HSQLDialect with non Integer or Long primary keys
> -----------------------------------------------------------------------------
>
>                 Key: HHH-3323
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3323
>             Project: Hibernate3
>          Issue Type: Bug
>    Affects Versions: 3.2.6
>         Environment: Hibernate 3.2.6 and Hibernate Annotations 3.3.1 on HSQL DB
>            Reporter: Jan Justesen
>
> From HSQL manual:
> "Only one identity column is allowed in each table. Identity columns are autoincrement columns. They must be of INTEGER or BIGINT type"
> When using HSQLDialect, the following code fails during schema creation:
> @Entity
> public class Test {
>   @Id @GeneratedValue(strategy = GenerationType.AUTO)
>   private Short id;
> }
> Log output:
> ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table Test (id smallint 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 smallint generated by default as identity (start with 1)]

-- 
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