[Hibernate-JIRA] Created: (HHH-4087) Session.flush() Causes AssertionFailure
by Brian (JIRA)
Session.flush() Causes AssertionFailure
----------------------------------------
Key: HHH-4087
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1
Reporter: Brian
After calling Session.save() with an entity, calling Session.flush() causes the following error.
org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
The mapping used was:
<component name="component" class="Component">
<property name="sequence" column="SEQUENCE" not-null="false" generated="insert"/>
<list name="myList" table="MY_LIST">
<key column="MY_LIST_KEY"/>
<index column="INDEX_COL"/>
<composite-element class="MyCompositeElement">
<property name="element" column="ELEMENT"/>
</composite-element>
</list>
</component>
--
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
14 years, 12 months
[Hibernate-JIRA] Created: (HHH-4701) ORA-00920: invalid relational operator using subquery
by Julien HENRY (JIRA)
ORA-00920: invalid relational operator using subquery
-----------------------------------------------------
Key: HHH-4701
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4701
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-2
Environment: Oracle 9i
Reporter: Julien HENRY
I have the following relations:
A*---B*---C
All my tables are using composite keys.
I want to delete all A in relation to a specific C entity.
My query is:
delete from A a where a in (select a1 from A a1 left join a1.b b left join b.c c where c.compositeId=:cId)
The resulting Oracle query is something like:
delete from A where (A_1, A_2) in (select (A_1, A_2) from A a1, B b1, C c1 where [...])
which produce the following error:
ORA-00920: invalid relational operator
I tried to fix the SQL query by removing parenthesis:
delete from A where (A_1, A_2) in (select A_1, A_2 from A a1, B b1, C c1 where [...])
which now give the following error:
ORA-00918: column ambiguously defined
And finally I arrived to a correct quesry by adding table prefix:
delete from A where (A_1, A_2) in (select a1.A_1, a1.A_2 from A a1, B b1, C c1 where [...])
I will try to create a test case. Is there any documentation on how to provide test case?
Regards
--
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
14 years, 12 months
[Hibernate-JIRA] Created: (HHH-3590) Having @version in Parent causes wrong HQL update when updating subclass in Joined Subclass Inheritance Strategy.
by Rachit (JIRA)
Having @version in Parent causes wrong HQL update when updating subclass in Joined Subclass Inheritance Strategy.
-----------------------------------------------------------------------------------------------------------------
Key: HHH-3590
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3590
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.1
Environment: Java 1.5 , Oracle 10g , Hibernate 3.3.1.GA
Reporter: Rachit
Priority: Blocker
A very simple joined subclass strategy implemented.
2 classes: Employee(parent/superclass) and Person( child/subclass)
Employee has @Version defined on column ROW_VERSION and Person extends Employee using Joined Inheritance Strategy. Person has PERSON_ID as PK and Employee has EMPLOYEE_ID as PK. I also have @PrimaryKeyJoinColumn(name = "PERSON_ID", referencedColumnName = "EMPLOYEE_ID") for obvious reason.
Now if I update any attribute in Child class i.e Person.setVIPFlag("Y") , hibernate fires an update query on Parent entity with wrong column name in hql. In this case the query would be "update EMPLOYEE set ROW_VERSION=? where PERSON_ID=? and ROW_VERSION=?". This query fails as EMPLOYEE does not have PERSON_ID.
The moment I remove @Version annotation from Parent(Employee) class, there is no update ( as expected ) and hence no error, but this is not an acceptable solution.
Thanking in anticipation.
--
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
14 years, 12 months
[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
14 years, 12 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
14 years, 12 months
[Hibernate-JIRA] Created: (HHH-2624) NullPointerException when Query.list()
by Eddie Man (JIRA)
NullPointerException when Query.list()
--------------------------------------
Key: HHH-2624
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2624
Project: Hibernate3
Issue Type: Bug
Components: core
Environment: MySQL database
Reporter: Eddie Man
Priority: Critical
Attachments: src.zip
The following exception was thrown when I calling Query.list():
Exception in thread "main" java.lang.NullPointerException
at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1641)
at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:608)
at org.hibernate.type.EntityType.resolve(EntityType.java:382)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
Reference issue :
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-48
Steps for reproduce the problem
==================
1. Unzip the attached file.
2. Execute the "schema.ddl" to create the tables.
3. Execute the "data.ddl" to insert the simple records.
4. Compile the src, and run the Main class.
--
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
14 years, 12 months