[Hibernate-JIRA] Created: (HHH-4743) Bug in BooleanLiteralNode with CustomType
by Jean-Francois Larouche (JIRA)
Bug in BooleanLiteralNode with CustomType
-----------------------------------------
Key: HHH-4743
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4743
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Hibernate 3.3.1.GA WebLogic 11. Oracle 10 and Ingres.
Reporter: Jean-Francois Larouche
Priority: Critical
We override a lot of our Hibernate types to support Dual databases.
Ive come upon a bug with boolean Primitives types wich lead me to this part of code in BooleanLiteralNode.
Why casting the type in this method to BooleanType instead of the interface LiteralType? Its used internally and for the objectToSQLString() method anyway, for getRenderText().
{code}
public String getRenderText(SessionFactoryImplementor sessionFactory) {
try {
return getTypeInternal().objectToSQLString( getValue(), sessionFactory.getDialect() );
}
catch( Throwable t ) {
throw new QueryException( "Unable to render boolean literal value", t );
}
}
{code}
This lead to a hidden ClassCastException because our boolean custom type inherits AbstractType and implements the interfaces.
{code}
public BooleanType getTypeInternal() {
return ( BooleanType ) getDataType();
}
{code}
Looks like some more people loose time with this.
Here is a link to a wich is directly in relation:
https://forum.hibernate.org/viewtopic.php?p=2362554
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HHH-2146) NullpointerException in DefaultDeleteEventListener.deleteTransientEntity
by Martin Kartumovich (JIRA)
NullpointerException in DefaultDeleteEventListener.deleteTransientEntity
------------------------------------------------------------------------
Key: HHH-2146
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2146
Project: Hibernate3
Type: Bug
Versions: 3.2.0.cr5
Environment: Hibernate 3.2.0cr5, Oracle10g
Reporter: Martin Kartumovich
Priority: Blocker
The following setup leads to a NPE in DefaultDeleteEventListener.deleteTransientEntity:
Tables A, B
Table V_A_B that is an M-N-Connection between A and B.
Pojo for A has a Set of V_A_Bs.
Pojo for B has a Set of V_A_Bs.
Pojo C that has Sets of As and Bs.
Cascades: all, delete-orphan
-Create a new A and add a new V_A_B to its Set, that references to an existing B.
-Delete B.
-SaveOrUpdate Pojo C.
In Hibernate 3.1.3 this works fine.
In 3.2.0cr4+cr5 the removal of B results into an cascading removal of the never persisted V_A_B in the Set of B instead of ignoring it.
This leads to an incorrect state where deleteTransientEntity is called with transientEnties=null.
When now calling transientEnties.contains(...) the NPE is thrown.
--
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
16 years, 3 months