Schema validation fails on HSQLDB for @Type(type="text") fields
---------------------------------------------------------------
Key: HHH-6583
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6583
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.6
Environment: Hibernate 3.6.6, HSQLDB 2.2.4
Reporter: Thilo-Alexander Ginkel
When declaring an entity's field as
@Column(name = "description", nullable = true)
@Type(type="text")
the schema validation fails with the following error message on HSQLDB:
org.hibernate.HibernateException: Wrong column type in <table> for column
description. Found: varchar, expected: longvarchar
at org.hibernate.mapping.Table.validateColumns(Table.java:283)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1343)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:378)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855)
at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774)
[...]
Apparently, HSQLDB maps the longvarchar column generated by Hibernate into a varchar(16M),
which confuses the validator.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira