[Hibernate-JIRA] Created: (ANN-580) Mistake in "2.2.2.3. Embedded objects (aka components)"
by Diego Pires Plentz (JIRA)
Mistake in "2.2.2.3. Embedded objects (aka components)"
-------------------------------------------------------
Key: ANN-580
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-580
Project: Hibernate Annotations
Type: Improvement
Components: documentation
Reporter: Diego Pires Plentz
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="city", column = @Column(name="fld_city") ) ** **
@AttributeOverride(name="nationality.iso2", column = @Column(name="nat_Iso2") ),
@AttributeOverride(name="nationality.name", column = @Column(name="nat_CountryName") )
//nationality columns in homeAddress are overridden
} )
Should be
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="city", column = @Column(name="fld_city") ) **, **
@AttributeOverride(name="nationality.iso2", column = @Column(name="nat_Iso2") ),
@AttributeOverride(name="nationality.name", column = @Column(name="nat_CountryName") )
//nationality columns in homeAddress are overridden
} )
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 5 months
[Hibernate-JIRA] Created: (HHH-2418) Refer HSQL DB website in chapter 1.2.3
by Diego Pires Plentz (JIRA)
Refer HSQL DB website in chapter 1.2.3
--------------------------------------
Key: HHH-2418
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2418
Project: Hibernate3
Type: Improvement
Components: documentation
Versions: 3.2.2
Reporter: Diego Pires Plentz
"1.2.3. Hibernate configuration
We now have a persistent class and its mapping file in place. It is time to configure Hibernate. Before we do this, we will need a database. HSQL DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website. Actually, you only need the hsqldb.jar from this download. Place this file in the lib/ directory of the development folder. "
to
"1.2.3. Hibernate configuration
We now have a persistent class and its mapping file in place. It is time to configure Hibernate. Before we do this, we will need a database. HSQL DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website(http://hsqldb.org/). Actually, you only need the hsqldb.jar from this download. Place this file in the lib/ directory of the development folder. "
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 5 months
[Hibernate-JIRA] Created: (HHH-2420) Error in 2.5. Contextual Sessions
by Diego Pires Plentz (JIRA)
Error in 2.5. Contextual Sessions
---------------------------------
Key: HHH-2420
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2420
Project: Hibernate3
Type: Improvement
Components: documentation
Reporter: Diego Pires Plentz
"Typically, the value of this parameter would just name the implementation class to use; for the three out-of-the-box implementations, however, there are **two** corresponding short names, "jta", "thread", and "managed"."
should be
"Typically, the value of this parameter would just name the implementation class to use; for the three out-of-the-box implementations, however, there are three corresponding short names, "jta", "thread", and "managed"."
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 5 months
[Hibernate-JIRA] Created: (HBX-945) CLONE -hbm2java does not generate correct POJO property types for UserType columns
by Brill Pappin (JIRA)
CLONE -hbm2java does not generate correct POJO property types for UserType columns
----------------------------------------------------------------------------------
Key: HBX-945
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-945
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.1alpha5
Environment: Pulled from CVS somewhere between 3.1a5 and 3.1b1
Reporter: Brill Pappin
Fix For: 3.1beta2
I have defined my own custom UserType (which coincidentally maps a DB2 decimal field to a java.sql.Date property, using some special formatting...).
My mapping file contains:
<property name="connectDate" type="DecimalDateType">
<column name="UMPCN" precision="8" scale="0" not-null="true" />
</property>
where DecimalDateType is the fully-qualified name of my UserType class.
The POJO generated contains the property:
private DecimalDateType connectDate;
This is incorrect. It SHOULD have generated a property of the type returned by DecimalDateType.returnedClass() (which in this case is java.sql.Date.class). ie. It should have been
private java.sql.Date connectDate;
The "decision" of which type to generate (ie where the error manifests itself) error appears to be in
Cfg2JavaTool.java
in the method
private String getJavaTypeName(Value value, boolean preferRawTypeNames)
I am not sure of the exact fix, since there appear to be other checks being done, and I do not understand all the logic here.
Thanks!
james
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months
[Hibernate-JIRA] Created: (HHH-2690) Cascade delete and ternary association after upgrade
by Przemek Dyk (JIRA)
Cascade delete and ternary association after upgrade
----------------------------------------------------
Key: HHH-2690
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2690
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1, 3.2.4, 3.2.3, 3.2.2, 3.2.1
Environment: hsqldb, jvm 1.6.0_01-ea, ubuntu
Reporter: Przemek Dyk
Attachments: manytest.zip
My classes:
public class Product {
private long id;
private String name;
private Map/*<Attribute,AttributeValue>*/ attributeValues;
//getters/setters/hashcode/equals
}
public class AttributeValue {
private long id;
private String value;
private Product product;
private Attribute attribute;
//getters/setters/hashcode/equals
}
public class Attribute {
private long id;
private String name;
//getters/setters/hashcode/equals
}
Fragment of mapping:
<class name="Product">
<id name="id" column="id" type="long" unsaved-value="0">
<generator class="native"/>
</id>
<property name="name" not-null="true"/>
<map name="attributeValues" lazy="true" inverse="false" cascade="all-delete-orphan">
<key column="product_id" not-null="true"/>
<map-key-many-to-many column="attribute_id" class="Attribute"/>
<one-to-many class="AttributeValue"/>
</map>
</class>
... and my exception after upgrading hibernate in my application.
2007-06-27 20:08:54 org.hibernate.property.BasicPropertyAccessor$BasicGetter get
SEVERE: IllegalArgumentException in class: com.mycompany.Attribute, getter method of property: id
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.mycompany.Attribute.id
at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:171)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:183)
at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3591)
at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3307)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:181)
at org.hibernate.engine.ForeignKeys$Nullifier.isNullifiable(ForeignKeys.java:137)
at org.hibernate.engine.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:69)
at org.hibernate.engine.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:47)
at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:248)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:141)
at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:775)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:758)
at org.hibernate.engine.CascadingAction$2.cascade(CascadingAction.java:121)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:307)
at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:246)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:141)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:52)
at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:766)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:744)
I've tried many versions of hibernate using test from attachment
( mvn -Dhibernate.version=<version> clean compile test ) and I think that
bug was introduced between 3.2.0.ga and 3.2.1.ga
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months