From noreply at atlassian.com Wed Aug 17 09:38:03 2011 Content-Type: multipart/mixed; boundary="===============7720956812738560470==" MIME-Version: 1.0 From: Thilo-Alexander Ginkel (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-6583) Schema validation fails on HSQLDB for @Type(type="text") fields Date: Wed, 17 Aug 2011 08:38:02 -0500 Message-ID: <30794596.2018.1313588282935.JavaMail.j2ee-onjira@hibernate.onjira.com> --===============7720956812738560470== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Schema validation fails on HSQLDB for @Type(type=3D"text") fields --------------------------------------------------------------- Key: HHH-6583 URL: http://opensource.atlassian.com/projects/hibernate/br= owse/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 =3D "description", nullable =3D true) @Type(type=3D"text") the schema validation fails with the following error message on HSQLDB: org.hibernate.HibernateException: Wrong column type in for column d= escription. Found: varchar, expected: longvarchar at org.hibernate.mapping.Table.validateColumns(Table.java:283) at org.hibernate.cfg.Configuration.validateSchema(Configuration.jav= a:1343) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValida= tor.java:139) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.= java:378) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuratio= n.java:1872) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSe= ssionFactory(LocalSessionFactoryBean.java:855) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.build= SessionFactory(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 =20 --===============7720956812738560470==-- From noreply at atlassian.com Wed Aug 17 22:42:03 2011 Content-Type: multipart/mixed; boundary="===============8930666896227614083==" MIME-Version: 1.0 From: Gail Badner (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-6583) Schema validation fails on HSQLDB for @Type(type="text") fields Date: Wed, 17 Aug 2011 21:42:02 -0500 Message-ID: <32196875.2346.1313635322790.JavaMail.j2ee-onjira@hibernate.onjira.com> In-Reply-To: 30794596.2018.1313588282935.JavaMail.j2ee-onjira@hibernate.onjira.com --===============8930666896227614083== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6583?p= age=3Dcom.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner resolved HHH-6583. ------------------------------ Resolution: Duplicate Assignee: Gail Badner > Schema validation fails on HSQLDB for @Type(type=3D"text") fields > --------------------------------------------------------------- > > Key: HHH-6583 > URL: http://opensource.atlassian.com/projects/hibernate/b= rowse/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 > Assignee: Gail Badner > > When declaring an entity's field as > @Column(name =3D "description", nullable =3D true) > @Type(type=3D"text") > the schema validation fails with the following error message on HSQLDB: > org.hibernate.HibernateException: Wrong column type in
for column= description. Found: varchar, expected: longvarchar > at org.hibernate.mapping.Table.validateColumns(Table.java:283) > at org.hibernate.cfg.Configuration.validateSchema(Configuration.j= ava:1343) > at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVali= dator.java:139) > at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImp= l.java:378) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configurat= ion.java:1872) > at org.springframework.orm.hibernate3.LocalSessionFactoryBean.new= SessionFactory(LocalSessionFactoryBean.java:855) > at org.springframework.orm.hibernate3.LocalSessionFactoryBean.bui= ldSessionFactory(LocalSessionFactoryBean.java:774) > [...] > Apparently, HSQLDB maps the longvarchar column generated by Hibernate int= o 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 =20 --===============8930666896227614083==--