You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-02 00:44:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-203?page=all ] Emmanuel Bernard resolved EJB-203: ---------------------------------- Fix Version: 3.2.0 Resolution: Fixed Assign To: Emmanuel Bernard Fixed in CVS thanks. > exception when using top-level <access>PROPERTY</access> in orm.xml > ------------------------------------------------------------------- > > Key: EJB-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-203 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0 cr2, Hibernate Annotations 3.2.0 cr1, Hibernate Entity Manager 3.2.0 cr1 > Reporter: Levi Purvis > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > > Consider a simple orm.xml: > <?xml version="1.0" encoding="UTF-8"?> > <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> > <access>PROPERTY</access> > <entity class="Foo"> > <table name="FOO" /> > </entity> > </entity-mappings> > The <access>PROPERTY</access> section appears to cause the following exception (JUnit part of the stack removed for clarity): > javax.persistence.PersistenceException: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) > Caused by: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:107) > at org.hibernate.property.PropertyAccessorFactory.getPojoPropertyAccessor(PropertyAccessorFactory.java:86) > at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:53) > at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166) > at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) > at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114) > at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418) > at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108) > at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) > at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760) > at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) > ... 19 more > Caused by: java.lang.ClassNotFoundException: PROPERTY > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:164) > at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102) > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:104) > ... 33 more -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-02 00:44:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-203?page=comments#action_23813 ] Emmanuel Bernard commented on EJB-203: -------------------------------------- I mean SVN > exception when using top-level <access>PROPERTY</access> in orm.xml > ------------------------------------------------------------------- > > Key: EJB-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-203 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0 cr2, Hibernate Annotations 3.2.0 cr1, Hibernate Entity Manager 3.2.0 cr1 > Reporter: Levi Purvis > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > > Consider a simple orm.xml: > <?xml version="1.0" encoding="UTF-8"?> > <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> > <access>PROPERTY</access> > <entity class="Foo"> > <table name="FOO" /> > </entity> > </entity-mappings> > The <access>PROPERTY</access> section appears to cause the following exception (JUnit part of the stack removed for clarity): > javax.persistence.PersistenceException: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) > Caused by: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:107) > at org.hibernate.property.PropertyAccessorFactory.getPojoPropertyAccessor(PropertyAccessorFactory.java:86) > at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:53) > at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166) > at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) > at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114) > at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418) > at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108) > at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) > at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760) > at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) > ... 19 more > Caused by: java.lang.ClassNotFoundException: PROPERTY > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:164) > at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102) > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:104) > ... 33 more -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-02 00:44:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-405?page=all ] Emmanuel Bernard resolved ANN-405: ---------------------------------- Resolution: Fixed > JPA XML overriding wrong when default schema and *-to-one association > --------------------------------------------------------------------- > > Key: ANN-405 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-405 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > > when default schema or catalog is defined in XML > and for associations defaulting to or explicitly set to @JoinColumn(s) > an extra @JoinTable is created -- 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 |
From: Adrian P. (JIRA) <no...@at...> - 2006-08-01 20:25:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-203?page=comments#action_23811 ] Adrian Price commented on EJB-203: ---------------------------------- I have encountered the same problem myself. Removing the top level <access>PROPERTY</access> element and adding <entity access="PROPERTY"...> attributes circumvented the problem. > exception when using top-level <access>PROPERTY</access> in orm.xml > ------------------------------------------------------------------- > > Key: EJB-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-203 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0 cr2, Hibernate Annotations 3.2.0 cr1, Hibernate Entity Manager 3.2.0 cr1 > Reporter: Levi Purvis > Priority: Minor > > > Consider a simple orm.xml: > <?xml version="1.0" encoding="UTF-8"?> > <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> > <access>PROPERTY</access> > <entity class="Foo"> > <table name="FOO" /> > </entity> > </entity-mappings> > The <access>PROPERTY</access> section appears to cause the following exception (JUnit part of the stack removed for clarity): > javax.persistence.PersistenceException: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) > Caused by: org.hibernate.MappingException: could not find PropertyAccessor class: PROPERTY > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:107) > at org.hibernate.property.PropertyAccessorFactory.getPojoPropertyAccessor(PropertyAccessorFactory.java:86) > at org.hibernate.property.PropertyAccessorFactory.getPropertyAccessor(PropertyAccessorFactory.java:53) > at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166) > at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) > at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114) > at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418) > at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108) > at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) > at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760) > at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205) > ... 19 more > Caused by: java.lang.ClassNotFoundException: PROPERTY > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:164) > at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102) > at org.hibernate.property.PropertyAccessorFactory.resolveCustomAccessor(PropertyAccessorFactory.java:104) > ... 33 more -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-01 20:00:16
|
JPA XML overriding wrong when default schema and *-to-one association --------------------------------------------------------------------- Key: ANN-405 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-405 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 when default schema or catalog is defined in XML and for associations defaulting to or explicitly set to @JoinColumn(s) an extra @JoinTable is created -- 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 |
From: Scott M. (JIRA) <no...@at...> - 2006-08-01 19:49:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1750?page=all ] Scott Marlow updated HHH-1750: ------------------------------ Fix Version: 3.2.0.ga > Exception ORA-01000 too many open cursors by generated="insert" > --------------------------------------------------------------- > > Key: HHH-1750 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1750 > Project: Hibernate3 > Type: Bug > Environment: Hibernate3, Oracle10g > Reporter: Andreas Dornhof > Assignee: Scott Marlow > Fix For: 3.2.0.ga > Attachments: HHH-1750.patch > > > When creating more as 300 Object in Oracle with insert="false" and generated="insert" by property - Tag in Mapping-File > causes an ORA-01000 "too many open cursors"... > It is executed using the following Java code: > SessionFactory sessionFactory; > > try { > // Create the SessionFactory from hibernate.cfg.xml > sessionFactory = new Configuration(). > configure(). > buildSessionFactory(); > } catch (Throwable ex) { > // Make sure you log the exception, as it might be swallowed > System.err.println("Initial SessionFactory creation failed." + ex); > throw new ExceptionInInitializerError(ex); > } > > try{ > > for (int i = 0; i <= 301; i++) { > > Session session = sessionFactory.getCurrentSession(); > Transaction tx = session.beginTransaction(); > > Test test = new Test(); > session.save(test); > > tx.commit(); > > } > > } catch (Exception e) { > System.out.println(e.getMessage()+e.getClass().toString()); > } > > And Mapping - File: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > > <hibernate-mapping> > <class > name="src.persistence.Test" > table="TEST" > > > > <id name="id" type="java.lang.Long" column="ID" > > > <generator class="sequence"> > <param name="sequence">TEST_SEQ</param> > </generator> > </id> > <property > name="created" > column="CREATED" > type="java.util.Date" > not-null="true" > insert="false" > update="false" > generated="insert" > > > </property> > </class> > </hibernate-mapping> -- 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 |
From: Scott M. (JIRA) <no...@at...> - 2006-08-01 19:47:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1750?page=all ] Scott Marlow reassigned HHH-1750: --------------------------------- Assign To: Scott Marlow > Exception ORA-01000 too many open cursors by generated="insert" > --------------------------------------------------------------- > > Key: HHH-1750 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1750 > Project: Hibernate3 > Type: Bug > Environment: Hibernate3, Oracle10g > Reporter: Andreas Dornhof > Assignee: Scott Marlow > Attachments: HHH-1750.patch > > > When creating more as 300 Object in Oracle with insert="false" and generated="insert" by property - Tag in Mapping-File > causes an ORA-01000 "too many open cursors"... > It is executed using the following Java code: > SessionFactory sessionFactory; > > try { > // Create the SessionFactory from hibernate.cfg.xml > sessionFactory = new Configuration(). > configure(). > buildSessionFactory(); > } catch (Throwable ex) { > // Make sure you log the exception, as it might be swallowed > System.err.println("Initial SessionFactory creation failed." + ex); > throw new ExceptionInInitializerError(ex); > } > > try{ > > for (int i = 0; i <= 301; i++) { > > Session session = sessionFactory.getCurrentSession(); > Transaction tx = session.beginTransaction(); > > Test test = new Test(); > session.save(test); > > tx.commit(); > > } > > } catch (Exception e) { > System.out.println(e.getMessage()+e.getClass().toString()); > } > > And Mapping - File: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > > <hibernate-mapping> > <class > name="src.persistence.Test" > table="TEST" > > > > <id name="id" type="java.lang.Long" column="ID" > > > <generator class="sequence"> > <param name="sequence">TEST_SEQ</param> > </generator> > </id> > <property > name="created" > column="CREATED" > type="java.util.Date" > not-null="true" > insert="false" > update="false" > generated="insert" > > > </property> > </class> > </hibernate-mapping> -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-01 19:01:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-404?page=all ] Emmanuel Bernard resolved ANN-404: ---------------------------------- Resolution: Rejected ah RTFM twice > Support ORM.xml cascade-* > ------------------------- > > Key: ANN-404 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-404 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Priority: Minor > > > only cascade-persist is supported so far > <xsd:element name="cascade-all" type="orm:emptyType" > minOccurs="0"/> > <xsd:element name="cascade-persist" type="orm:emptyType" > minOccurs="0"/> > <xsd:element name="cascade-merge" type="orm:emptyType" > minOccurs="0"/> > <xsd:element name="cascade-remove" type="orm:emptyType" > minOccurs="0"/> > <xsd:element name="cascade-refresh" type="orm:emptyType" > minOccurs="0"/> -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-08-01 16:20:18
|
Support ORM.xml cascade-* ------------------------- Key: ANN-404 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-404 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Priority: Minor only cascade-persist is supported so far <xsd:element name="cascade-all" type="orm:emptyType" minOccurs="0"/> <xsd:element name="cascade-persist" type="orm:emptyType" minOccurs="0"/> <xsd:element name="cascade-merge" type="orm:emptyType" minOccurs="0"/> <xsd:element name="cascade-remove" type="orm:emptyType" minOccurs="0"/> <xsd:element name="cascade-refresh" type="orm:emptyType" minOccurs="0"/> -- 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 |
From: Daniel D. (JIRA) <no...@at...> - 2006-08-01 10:10:13
|
Schema validation fails with floating point column in Oracle 10g ---------------------------------------------------------------- Key: HHH-1961 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961 Project: Hibernate3 Type: Bug Versions: 3.2.0.cr2 Environment: 3.2 CR 2, Oracle 10g express edition release 2, Windows XP service pack 2, JDK 1.5.0_06 Reporter: Daniel Dyer I have a table (created automatically by Hibernate) for mapping a double field. The table creation from Ant works fine but when starting up JBoss with the hibernate.hbm2ddl.auto property set to validate, I get the following exception: Caused by: org.hibernate.HibernateException: Wrong column type: percentage, expected: double precision at org.hibernate.mapping.Table.validateColumns(Table.java:219) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575) at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260) ... 127 more Doing a "desc" on the table reveals that the column is of type FLOAT with a length of 22. I think this may be related to issue HHH-1566 or HHH-1008. -- 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 |
From: Amir P. (JIRA) <no...@at...> - 2006-07-31 22:33:16
|
Improve Java 5 Enums dependency on old fashioned enums ------------------------------------------------------ Key: ANN-403 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-403 Project: Hibernate Annotations Type: Improvement Versions: 3.2.0.cr1 Reporter: Amir Pashazadeh Priority: Minor Converting from new enum types (like FlushModeType and CacheModeType) to old enum types (which is used by Query, Critiera, and ... interfaces) is not done well, and well formed. By adding constructors to new enums this could be much better, and more perform! I will attach what must have been done in FlushModeType, the same thing must happen to CacheModeType: public enum FlushModeType { /** * see {@link org.hibernate.FlushMode.ALWAYS} */ ALWAYS(FlushMode.ALWAYS), /** * see {@link org.hibernate.FlushMode.AUTO} */ AUTO(FlushMode.AUTO), /** * see {@link org.hibernate.FlushMode.COMMIT} */ COMMIT(FlushMode.COMMIT), /** * see {@link org.hibernate.FlushMode.NEVER} */ NEVER(FlushMode.NEVER); FlushModeType(FlushMode flushMode) { this.flushMode = flushMode; } private FlushMode flushMode; /** * @return old type proper FlushMode */ public FlushMode getFlushMode() { return flushMode; } } -- 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 |
From: Francois J. (JIRA) <no...@at...> - 2006-07-31 21:26:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-716?pag= e=3Dcomments#action_23809 ]=20 Francois Jean commented on HBX-716: ----------------------------------- Just to be sure to do the right thing. Presently the pojo generation will generate the class OR the interface but = not both at the same time. So the patch would generate the constant string in an Interface while gener= ating the pojo class. It will also add the constant String in the interface= if we specify <meta attribute=3D"interface">true</meta> in the xxx.hbm.xml= file. Is it what you want? > Trick to help maintenance of HQL query. > --------------------------------------- > > Key: HBX-716 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= BX-716 > Project: Hibernate Tools > Type: Improvement > Components: hbm2java > Versions: 3.2beta6 > Reporter: Francois Jean > Priority: Minor > Attachments: patch.txt > > > I'm just sending a modification I made to a FreeMarket template in Hibern= ate Tools (hbm2java) to help us maintaining our HQL. > We are using a large database with more the 300 tables and we often do a = reverse-engineering of the database to keep our Java entities in synch and = sometimes we have to deal with column names change. After the reverse-engin= eering process, the compiler will show errors for all the getter/setter tha= t have change name. But it will not show any errors in HQL using "old" attr= ibute names. > For example if we have a table "Application" with a column "Version_num",= we would get a Class "Application" with an attribute "versionNum" and its = own getter and setter. If the column "Version_num" change its name for "App= _version_num", the new attribute name will be "appVersionNum" with its new = getter/setter. And the compiler will show errors for old code using the get= ter "getVersionNum". But will not show any errors for HQL like: "from " +Ap= plication.class.getName() + " where versionNum =3D 3" > Solution: > We modify the generation of the entity to include a constant string for e= ach attribute name, by using these constants the compiler can flag error in= HQL. The new HQL would be: > "from " +Application.class.getName() + " where "+ Application.VERSIONNUM = + " =3D 3" > For now, we always generate these constants but it could be possible to t= rigger the constants generation by using a parameter in the ant task when a= sking Hibernate Tools to generate Java entities. > Template that was modified: PojoFields.ftl > // Fields name constant > =20 > <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttri= bAsBool(field, "gen-property", true)> > public static final String ${field.name?upper_case} =3D "${field.nam= e}"; > </#if> > </#foreach> > =20 > // Fields =20 > <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttri= bAsBool(field, "gen-property", true)> <#if pojo.hasMetaAttribute(field, "fi= eld-description")> /** > ${pojo.getFieldJavaDoc(field, 0)} > */ > </#if> ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field,= jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> =3D ${pojo= .getFieldInitialization(field, jdk5)}</#if>; > </#if> > </#foreach> > PS: This solution is not perfect, a better approach would be something th= at would also validate at compilation time the type of association. For exa= mple, the association "person.address.city" present in a HQL statement will= only be validated when this HQL will be executed. > Fran=C3=A7ois J. --=20 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 |
From: Michael R. (JIRA) <no...@at...> - 2006-07-31 21:07:14
|
A combination of Criteria, fetch="join", and possibly "many-to-many" mapping creates wrong number of objects. ------------------------------------------------------------------------------------------------------------- Key: HHH-1960 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1960 Project: Hibernate3 Type: Bug Components: query-criteria Versions: 3.1.3 Environment: Version 3.1.3, all databases. Reporter: Michael Reviakin Add following method to the EventManager class from the tutorial: List findPerson(String lastName) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); List result = session.createCriteria(Person.class). add(Restrictions.eq("lastName", lastName)). list(); session.getTransaction().commit(); return result; } Create at least one Person and two Events, add Person to both Events. call System.out.println(eventManager.findPerson(person.getLastName()).size()); The output should be 1. Change Person.hbm.xml file, add fetch="join" attribute to the events mapping as following: <set name="events" table="PERSON_EVENT" fetch="join"> <key column="PERSON_ID"/> <many-to-many column="EVENT_ID" class="events.Event"/> </set> Run the same test, the output will be 2. Change "functional" part of the findPerson method to: List result = session.createQuery("from Person where lastName = :lastName"). setString("lastName", lastName). list(); Run the same test, the output will be 1 again. -- 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 |
From: Scott M. (JIRA) <no...@at...> - 2006-07-31 20:32:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1931?page=comments#action_23808 ] Scott Marlow commented on HHH-1931: ----------------------------------- Updated org.hibernate.tool.instrument.cglib.InstrumentTask to only transform methods that accept "instrumented" classes as parameters. > verify that the instrument tasks actually work > ---------------------------------------------- > > Key: HHH-1931 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1931 > Project: Hibernate3 > Type: Task > Components: core > Reporter: Steve Ebersole > Assignee: Scott Marlow > Attachments: InstrumentBugTest.zip > > > It appears they may not in all cases. -- 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 |
From: Brad L V. (JIRA) <no...@at...> - 2006-07-31 16:03:17
|
Callable update/insert/delete statements should not force rowcount out parameter in AbstractEntityPersister ----------------------------------------------------------------------------------------------------------- Key: HHH-1959 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1959 Project: Hibernate3 Type: Bug Versions: 3.2.0.cr3 Reporter: Brad L Vandermoon It appears as though callable statements in DB2 for AbstractCollectionPersister was resolved under HHH-1792; however, the AbstractEntityPersister was not changed to use the new Expectations class instead of the check function. The check function call in "delete(final Serializable id, final Object version, final int j, final Object object, final String sql, final SessionImplementor session) throws HibernateException" and "update(final Serializable id, final Object[] fields, final Object[] oldFields, final Object rowId, final boolean[] includeProperty, final int j, final Object oldVersion, final Object object, final String sql, final SessionImplementor session) throws HibernateException"appears to need to replace with a call to expectation.verifyOutcome(). The insert function does not currently call check. Should it call expectation.verifyOutcome() to be consistent with delete and update implementations. Snippet of my change for update(final Serializable id, final Object[] fields, final Object[] oldFields, final Object rowId, final boolean[] includeProperty, final int j, final Object oldVersion, final Object object, final String sql, final SessionImplementor session) throws HibernateException: if ( useBatch ) { session.getBatcher().addToBatch( expectation ); return true; } else { expectation.verifyOutcome( update.executeUpdate(), update, -1 ); return true; } -- 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 |
From: Fernando L. (JIRA) <no...@at...> - 2006-07-31 13:59:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938?page=comments#action_23807 ] Fernando Lozano commented on HHH-1938: -------------------------------------- The Hibernate MBean from forces the use of javaassit, and it does not have a corresponding attribute. (see createService() from http://fisheye.labs.jboss.com/viewrep/~raw,r=1.3.2.19/JBoss/hibernate/src/main/org/jboss/hibernate/jmx/Hibernate.java) I understand that if I use the Hibernate MBean an hibernate.properties file will not be used. :-( > Proxy creation may fails when duplicate methods are used by the compiler > ------------------------------------------------------------------------ > > Key: HHH-1938 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > > > http://jira.jboss.com/jira/browse/JASSIST-24 -- 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 |
From: Francois J. (JIRA) <no...@at...> - 2006-07-31 12:55:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938?page=comments#action_23806 ] Francois Jean commented on HHH-1938: ------------------------------------ I tried to add the setting "hibernate.bytecode.provider=cglib " in hibernate.properties. The setting was loaded by hibernate but javassist was still used. Since you do not have ej3 support maybe just adding that property in hibernate.properties may work for you. > Proxy creation may fails when duplicate methods are used by the compiler > ------------------------------------------------------------------------ > > Key: HHH-1938 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > > > http://jira.jboss.com/jira/browse/JASSIST-24 -- 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 |
From: Fernando L. (JIRA) <no...@at...> - 2006-07-31 12:41:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938?page=comments#action_23805 ] Fernando Lozano commented on HHH-1938: -------------------------------------- The same problem happens for plain-Hibernate users (har archives) without ejb3 support. I see the Hibernate MBean does not support this hibernate.bytecode.provider attribute. Is there a way to define this system propertu for hibernate inside jboss without needing to change my application of the jboss start-up scripts? > Proxy creation may fails when duplicate methods are used by the compiler > ------------------------------------------------------------------------ > > Key: HHH-1938 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > > > http://jira.jboss.com/jira/browse/JASSIST-24 -- 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 |
From: B.Schmacka (JIRA) <no...@at...> - 2006-07-31 12:00:31
|
EntityManager.find() fails finding JOINED mapped Subclass by ID and Superclass in MySql ---------------------------------------------------------------------------------------- Key: EJB-208 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-208 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Environment: WinXP Reporter: B.Schmacka Attachments: hibernate_bug.zip There is a by finding an entity by ID from the EntityManager using its find() method. If does not work if you use MySql and try to find an abstract entity by id and its abstract super class: I used Hibernate to persist the object. I boiled it down to the following test lines: Test model classes: @Entity @Inheritance(strategy = InheritanceType.JOINED) public abstract class AbstractSuperclass{ Long id; @Id @GeneratedValue public Long getId() { return id; } public void setId(Long id) { this.id = id; } } @Entity public class Subclass extends AbstractSuperclass {} Test Code: EntityManager firstSession = ... Subclass u = new Subclass(); firstSession.getTransaction().begin(); firstSession.persist(u); firstSession.getTransaction().commit(); Long newId = u.getId(); System.out.println("new ID is:" + newId); firstSession.close(); EntityManager secondSession = ... secondSession.getTransaction().begin(); // 1. Subclass result1 = secondSession.find(Subclass.class, newId); System.out.println("1. result is:" + result1); // 2. Subclass result2 = (Subclass) secondSession.find(AbstractSuperclass.class, newId); System.out.println("2. result is:" + result2); secondSession.getTransaction().commit(); secondSession.close(); Result is: new ID is:1 1. result is:null 2. result is:com.riacom.dms.model.Subclass@3afb99 But it works (first result is != null) with SINGLE_TABLE. It also works with JOINED tables for postgres and hsqldb, but not for mysql. An small test case (eclipse project including all libs) is provided as attachment. -- 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 |
From: MAHMUT Y. (JIRA) <no...@at...> - 2006-07-31 11:05:17
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1685?page=comments#action_23804 ] MAHMUT YILDIZ commented on HHH-1685: ------------------------------------ Yes, i have the same problem. When does it fix? > DetachedCriteria doesn't create alias on subcriteria > ---------------------------------------------------- > > Key: HHH-1685 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1685 > Project: Hibernate3 > Type: Bug > Components: query-criteria > Versions: 3.1.3 > Reporter: John > Attachments: hhh1685-example.txt > > > DetachedCriteria has two createCriteria methods: > public DetachedCriteria createCriteria(String associationPath) throws HibernateException > public DetachedCriteria createCriteria(String associationPath, String alias) throws HibernateException > However, the code for both was identical - they called the inner criteria's createCriteria(String) method. The version with the alias did not call the inner's version with the alias. The following patch snipped shows the change: > public DetachedCriteria createCriteria(String associationPath, String alias) > throws HibernateException { > - return new DetachedCriteria( impl, criteria.createCriteria(associationPath) ); > + return new DetachedCriteria( impl, criteria.createCriteria(associationPath, alias) ); > } > This bug was discovered while trying to link a 2-deep subquery to its parent via aliases. (Surfacing this issue might only be possible with the patch HHH-952 in place - I'm not sure. Seems like a bug regardless, as it definitely fixed my alias reference issue.) I'll get an example posted shortly. -- 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-30 18:02:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23803 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- ...and you do know that hbm2ddl also works for annotations ? (the hbm in hbm2ddl stands for hibenrate meta model or mapping model if you so wish, it does not stand for hbm.xml) And codegeneration based on annotations is also completely possible if you wish to do that. just use an <annotationconfiguration> > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Daniel P. (JIRA) <no...@at...> - 2006-07-30 17:11:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23802 ] Daniel Pocock commented on HBX-713: ----------------------------------- a) I prefer to describe my entities with XML descriptions rather than writing all the necessary Java code, setters, getters, etc - is this no longer the correct way of doing things? I write the definitions in XML, and then use hbm2ddl to create my database tables, and hbm2java to create the Entity bean classes b) When the generated classes are used at higher levels of the application (e.g. the UI layer, with Seam), the annotations are required > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-30 14:38:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-716?pag= e=3Dcomments#action_23801 ]=20 Max Rydahl Andersen commented on HBX-716: ----------------------------------------- i won't not put hql property names into the generated pojos, but i will acc= ept a patch that generates an interface that you can optionally choose to i= mplent on your pojo. Feel free to change your patch to that and i'll apply it. HQL compilation validaton is currently available for named queries and i'm = working on adding it to the eclipse plugins too as problem markers. > Trick to help maintenance of HQL query. > --------------------------------------- > > Key: HBX-716 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= BX-716 > Project: Hibernate Tools > Type: Improvement > Components: hbm2java > Versions: 3.2beta6 > Reporter: Francois Jean > Priority: Minor > Attachments: patch.txt > > > I'm just sending a modification I made to a FreeMarket template in Hibern= ate Tools (hbm2java) to help us maintaining our HQL. > We are using a large database with more the 300 tables and we often do a = reverse-engineering of the database to keep our Java entities in synch and = sometimes we have to deal with column names change. After the reverse-engin= eering process, the compiler will show errors for all the getter/setter tha= t have change name. But it will not show any errors in HQL using "old" attr= ibute names. > For example if we have a table "Application" with a column "Version_num",= we would get a Class "Application" with an attribute "versionNum" and its = own getter and setter. If the column "Version_num" change its name for "App= _version_num", the new attribute name will be "appVersionNum" with its new = getter/setter. And the compiler will show errors for old code using the get= ter "getVersionNum". But will not show any errors for HQL like: "from " +Ap= plication.class.getName() + " where versionNum =3D 3" > Solution: > We modify the generation of the entity to include a constant string for e= ach attribute name, by using these constants the compiler can flag error in= HQL. The new HQL would be: > "from " +Application.class.getName() + " where "+ Application.VERSIONNUM = + " =3D 3" > For now, we always generate these constants but it could be possible to t= rigger the constants generation by using a parameter in the ant task when a= sking Hibernate Tools to generate Java entities. > Template that was modified: PojoFields.ftl > // Fields name constant > =20 > <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttri= bAsBool(field, "gen-property", true)> > public static final String ${field.name?upper_case} =3D "${field.nam= e}"; > </#if> > </#foreach> > =20 > // Fields =20 > <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttri= bAsBool(field, "gen-property", true)> <#if pojo.hasMetaAttribute(field, "fi= eld-description")> /** > ${pojo.getFieldJavaDoc(field, 0)} > */ > </#if> ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field,= jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> =3D ${pojo= .getFieldInitialization(field, jdk5)}</#if>; > </#if> > </#foreach> > PS: This solution is not perfect, a better approach would be something th= at would also validate at compilation time the type of association. For exa= mple, the association "person.address.city" present in a HQL statement will= only be validated when this HQL will be executed. > Fran=C3=A7ois J. --=20 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-30 13:32:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23800 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- yes I understood what you wanted to do; I just don't understand the usecase ;) Why are you not writing the entities directly instead of via hbm.xml's ? Adding class-annotation, might make sense, but I'm just curious since it feels a bit backward and what will be needed next? (e.g. property-get-annotation etc.) > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Daniel P. (JIRA) <no...@at...> - 2006-07-29 16:59:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23799 ] Daniel Pocock commented on HBX-713: ----------------------------------- hbm2java only inserts the EJB3 annotations (e.g. @Entity) - we want to insert any arbitrary annotation, e.g. annotations used for Seam > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |