From noreply at atlassian.com Thu Dec 20 15:16:06 2007 Content-Type: multipart/mixed; boundary="===============1372775352493966997==" MIME-Version: 1.0 From: Max Rydahl Andersen (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Thu, 20 Dec 2007 14:16:06 -0600 Message-ID: <160737580.1198181766311.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============1372775352493966997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-849?pa= ge=3Dcom.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Max Rydahl Andersen updated HBX-849: ------------------------------------ Issue Type: Patch (was: Bug) oversight and no testcase..i've marked it as patch so it gets noticed. > Tools does not insert @Type in POJOs for user types defined in reveng.xml > ------------------------------------------------------------------------- > > Key: HBX-849 > URL: http://opensource.atlassian.com/projects/hibernate/b= rowse/HBX-849 > Project: Hibernate Tools > Issue Type: Patch > Components: hbm2java, reverse-engineer > Environment: jboss-seam-1.1.0.GA, MySQL > Reporter: Zeljko Trogrlic > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, POJOClass.java > > > I have created reveng.xml file: > > catalog=3D"configuration" > name=3D"userdb_domain_acl"> > >
>
> and included it in build.xml: > packagename=3D"${model.package}" > revengfile=3D"${project.home}/reveng.xml"= /> > Generated POJO attribute has proper type, but user type information is mi= ssing: > @Column(name =3D "enabled") > @Length(max =3D 42) > public Boolean getEnabled() { > .... > so Hibernate reports error: > 3:49:31,397 INFO [TableMetadata] table found: configuration.userdb_domai= n_acl > 13:49:31,397 INFO [TableMetadata] columns: [id, enabled, tablename, doma= in] > 13:49:31,397 WARN [ServiceController] Problem starting service persisten= ce.units:ear=3Dmsmgui.ear,unitName=3Dmsmgui > javax.persistence.PersistenceException: org.hibernate.HibernateException:= Wrong column type: enabled, expected: varchar( > 2) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(= Ejb3Configuration.java:698) > at org.hibernate.ejb.HibernatePersistence.createContainerEntityMa= nagerFactory(HibernatePersistence.java:127) > at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(Persiste= nceUnitDeployment.java:264) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > Annotations should look like this: > @Column(name =3D "enabled") > @Type(type=3D"booleanEnum") > public Boolean getEnabled() { > ... -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============1372775352493966997==--