From noreply at atlassian.com Wed Jan 10 11:58:44 2007 Content-Type: multipart/mixed; boundary="===============4798807106448841299==" MIME-Version: 1.0 From: Zeljko Trogrlic (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Wed, 10 Jan 2007 10:58:44 -0600 Message-ID: <148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com> --===============4798807106448841299== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Tools does not insert @Type in POJOs for user types defined in reveng.xml ------------------------------------------------------------------------- Key: HBX-849 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX= -849 Project: Hibernate Tools Type: Bug Components: hbm2java, reverse-engineer = Environment: jboss-seam-1.1.0.GA, MySQL Reporter: Zeljko Trogrlic I have created reveng.xml file:
and included it in build.xml: Generated POJO attribute has proper type, but user type information is miss= ing: @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_domain_= acl 13:49:31,397 INFO [TableMetadata] columns: [id, enabled, tablename, domain] 13:49:31,397 WARN [ServiceController] Problem starting service persistence= .units:ear=3Dmsmgui.ear,unitName=3Dmsmgui javax.persistence.PersistenceException: org.hibernate.HibernateException: W= rong column type: enabled, expected: varchar( 2) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ej= b3Configuration.java:698) at org.hibernate.ejb.HibernatePersistence.createContainerEntityMana= gerFactory(HibernatePersistence.java:127) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(Persistenc= eUnitDeployment.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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --===============4798807106448841299==-- From noreply at atlassian.com Wed Jan 10 12:00:44 2007 Content-Type: multipart/mixed; boundary="===============0006162136954350319==" MIME-Version: 1.0 From: Zeljko Trogrlic (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Wed, 10 Jan 2007 11:00:44 -0600 Message-ID: <81189930.1168448444386.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============0006162136954350319== 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?pag= e=3Dcomments#action_25775 ] = Zeljko Trogrlic commented on HBX-849: ------------------------------------- See discussion here: http://forum.hibernate.org/viewtopic.php?p=3D2336656#2= 336656 > Tools does not insert @Type in POJOs for user types defined in reveng.xml > ------------------------------------------------------------------------- > > Key: HBX-849 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= BX-849 > Project: Hibernate Tools > Type: Bug > Components: hbm2java, reverse-engineer > Environment: jboss-seam-1.1.0.GA, MySQL > Reporter: Zeljko Trogrlic > > > 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --===============0006162136954350319==-- From noreply at atlassian.com Fri Jan 12 13:03:44 2007 Content-Type: multipart/mixed; boundary="===============2983493586273603596==" MIME-Version: 1.0 From: Zeljko Trogrlic (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: Fri, 12 Jan 2007 12:03:44 -0600 Message-ID: <85449000.1168625024592.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============2983493586273603596== 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=3Dall ] Zeljko Trogrlic updated HBX-849: -------------------------------- Attachment: BasicPOJOClass.java POJOClass.java Ejb3PropertyGetAnnotation.ftl These files solve described issue. Please put them to repository. > Tools does not insert @Type in POJOs for user types defined in reveng.xml > ------------------------------------------------------------------------- > > Key: HBX-849 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= BX-849 > Project: Hibernate Tools > Type: Bug > Components: hbm2java, reverse-engineer > Environment: jboss-seam-1.1.0.GA, MySQL > Reporter: Zeljko Trogrlic > Attachments: BasicPOJOClass.java, Ejb3PropertyGetAnnotation.ftl, POJOCla= ss.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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --===============2983493586273603596==-- From noreply at atlassian.com Sun Jan 14 15:49:44 2007 Content-Type: multipart/mixed; boundary="===============4885813637049103997==" MIME-Version: 1.0 From: Zeljko Trogrlic (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: Sun, 14 Jan 2007 14:49:44 -0600 Message-ID: <115935452.1168807784213.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============4885813637049103997== 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=3Dall ] Zeljko Trogrlic updated HBX-849: -------------------------------- Attachment: BasicPOJOClass.java importType added; missing in original upload. > Tools does not insert @Type in POJOs for user types defined in reveng.xml > ------------------------------------------------------------------------- > > Key: HBX-849 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= BX-849 > Project: Hibernate Tools > Type: Bug > Components: hbm2java, reverse-engineer > Environment: jboss-seam-1.1.0.GA, MySQL > Reporter: Zeljko Trogrlic > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3PropertyGetAn= notation.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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --===============4885813637049103997==-- From noreply at atlassian.com Thu Dec 20 13:04:06 2007 Content-Type: multipart/mixed; boundary="===============6398853287820751974==" MIME-Version: 1.0 From: Matthew Lieder (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Thu, 20 Dec 2007 12:04:05 -0600 Message-ID: <129331021.1198173845690.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============6398853287820751974== 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?pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action= _29190 ] = Matthew Lieder commented on HBX-849: ------------------------------------ Why hasn't this been incorporated into the trunk yet? This is an obvious de= ficiency and a patch is available... > 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: Bug > 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 --===============6398853287820751974==-- From noreply at atlassian.com Thu Dec 20 15:16:06 2007 Content-Type: multipart/mixed; boundary="===============0613512894188386952==" 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 --===============0613512894188386952== 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 --===============0613512894188386952==-- From noreply at atlassian.com Mon Sep 8 05:41:04 2008 Content-Type: multipart/mixed; boundary="===============0251651362456001990==" MIME-Version: 1.0 From: Max Rydahl Andersen (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Mon, 08 Sep 2008 04:41:04 -0500 Message-ID: <13261324.1220866864317.JavaMail.j2ee@atlassian01.managed.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============0251651362456001990== 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 reassigned HBX-849: --------------------------------------- Assignee: Anthony Patricio > 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 > Assignee: Anthony Patricio > 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 --===============0251651362456001990==-- From noreply at atlassian.com Sat Jan 9 07:11:32 2010 Content-Type: multipart/mixed; boundary="===============0705906588880100643==" MIME-Version: 1.0 From: Reiner Saddey (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: Sat, 09 Jan 2010 06:11:31 -0600 Message-ID: <1795298692.1928.1263039091733.JavaMail.j2ee-opensource-projects@vps07.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============0705906588880100643== 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 ] Reiner Saddey updated HBX-849: ------------------------------ Attachment: HBX-849.patch Merging Zeljko's sources with current Branch_3_2/HibernateExt, I've created= a patch against revision 18464. > 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 > Assignee: Anthony Patricio > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, HBX-849.patch, 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 --===============0705906588880100643==-- From noreply at atlassian.com Sat Jan 9 07:40:30 2010 Content-Type: multipart/mixed; boundary="===============3094835735513574809==" MIME-Version: 1.0 From: Reiner Saddey (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Sat, 09 Jan 2010 06:40:30 -0600 Message-ID: <20007211.1934.1263040830426.JavaMail.j2ee-opensource-projects@vps07.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============3094835735513574809== 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?pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focuse= dCommentId=3D35164#action_35164 ] = Reiner Saddey commented on HBX-849: ----------------------------------- Until this issue is fixed (which in my opinion could take a considerable am= ount of time due to its complex build - if it only were a Maven project), i= t can be worked around yielding identical results and without any changes t= o released code - just by using all the hidden marvels Hibernate Tools has = to offer. Within this description, I'm assuming that the JBoss Hibernate Ec= lipse plugin be used. = # Create a utility Class (e.g. Ejb3CustomTypeAnnotation) that constructs a = @Type annotation from a pojo and one of its properties. # Within your Hibernate Code Generation Configuration, make this utility cl= ass available by selecting the Domain code exporter and adding a property n= amed hibernatetool.Ejb3CustomTypeAnnotation.toolclass stating the full name= of the utility class (e.g. com.carano.fw.hibernate.util.reverse.Ejb3Custom= TypeAnnotation). # Within your Eclipse-project, create a templates/pojo directory and supply= an enhanced version of Ejb3PropertyGetAnnotation.ftl that calls Ejb3Custom= TypeAnnotation. # Within your Hibernate Code Generation Configuration, check Use custom tem= plates und select the templates directory (not the templates/pojo). Et voil=C3=A0 - your POJOS will have @Type for custom types :-) = Your utility class should look similar to: {code:java} package com.carano.fw.hibernate.util.reverse; import org.hibernate.mapping.Property; import org.hibernate.tool.hbm2x.pojo.POJOClass; import org.hibernate.type.CustomType; import org.hibernate.type.Type; /** * Define Property hibernatetool.Ejb3CustomTypeAnnotation.toolclass =3D * com.carano.fw.hibernate.util.reverse.Ejb3CustomTypeAnnotation * = * Use as ${Ejb3CustomTypeAnnotation}.generateAnnTypeAnnotation(pojo,proper= ty) * within Ejb3PropertyGetAnnotation.ftl */ public class Ejb3CustomTypeAnnotation { public String generateAnnTypeAnnotation(final POJOClass pojoClass, fina= l Property property) { final Type type =3D property.getType(); if (type instanceof CustomType) { return " @" + pojoClass.importType("org.hibernate.annotation= s.Type") + "(type=3D\"" + type.getName() + "\")"; } else { return ""; } } } {code} Your enhanced Ejb3PropertyGetAnnotation.ftl should look similar to: {code} <#if ejb3> <#if pojo.hasIdentifierProperty()> <#if property.equals(clazz.identifierProperty)> ${pojo.generateAnnIdGenerator()} <#-- if this is the id property (getter)--> <#-- explicitly set the column name for this property--> <#if c2h.isOneToOne(property)> ${pojo.generateOneToOneAnnotation(property, cfg)} <#elseif c2h.isManyToOne(property)> ${pojo.generateManyToOneAnnotation(property)} <#--TODO support optional and targetEntity--> = ${pojo.generateJoinColumnsAnnotation(property, cfg)} <#elseif c2h.isCollection(property)> ${pojo.generateCollectionAnnotation(property, cfg)} <#else> ${pojo.generateBasicAnnotation(property)} ${pojo.generateAnnColumnAnnotation(property)} ${Ejb3CustomTypeAnnotation.generateAnnTypeAnnotation(pojo,property)} {code} > 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 > Assignee: Anthony Patricio > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, HBX-849.patch, 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 = --===============3094835735513574809==-- From noreply at atlassian.com Tue Jan 26 09:12:32 2010 Content-Type: multipart/mixed; boundary="===============5516574123538277919==" MIME-Version: 1.0 From: Max Rydahl Andersen (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Tue, 26 Jan 2010 08:12:32 -0600 Message-ID: <690923428.3380.1264515152467.JavaMail.j2ee-opensource-projects@vps07.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============5516574123538277919== 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?pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focuse= dCommentId=3D35342#action_35342 ] = Max Rydahl Andersen commented on HBX-849: ----------------------------------------- Reiner, you said you created an updated patch but I don't see any new patch= attached? > 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 > Assignee: Anthony Patricio > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, HBX-849.patch, 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 --===============5516574123538277919==-- From noreply at atlassian.com Tue Jan 26 09:21:31 2010 Content-Type: multipart/mixed; boundary="===============7712784262730882005==" MIME-Version: 1.0 From: Reiner Saddey (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-849) Tools does not insert @Type in POJOs for user types defined in reveng.xml Date: Tue, 26 Jan 2010 08:21:30 -0600 Message-ID: <1368583579.3389.1264515690533.JavaMail.j2ee-opensource-projects@vps07.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============7712784262730882005== 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?pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focuse= dCommentId=3D35343#action_35343 ] = Reiner Saddey commented on HBX-849: ----------------------------------- Mea culpa Max, as I just don't know how to provide a formal patch file I've= attached it to this bug as a "normal" SVN patch file: [^HBX-849.patch] > 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 > Assignee: Anthony Patricio > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, HBX-849.patch, 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 --===============7712784262730882005==-- From noreply at atlassian.com Fri Sep 24 08:55:58 2010 Content-Type: multipart/mixed; boundary="===============0881147451343834151==" 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: Fri, 24 Sep 2010 07:55:58 -0500 Message-ID: <306682529.12.1285332958168.JavaMail.j2ee-opensource-projects@vps07.contegix.com> In-Reply-To: 148166990.1168448324281.JavaMail.j2ee@atlassian01.managed.contegix.com --===============0881147451343834151== 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: ------------------------------------ Fix Version/s: 3.2.4.GA > 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 > Assignee: Anthony Patricio > Fix For: 3.2.4.GA > > Attachments: BasicPOJOClass.java, BasicPOJOClass.java, Ejb3Proper= tyGetAnnotation.ftl, HBX-849.patch, 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 --===============0881147451343834151==--