[Hibernate-JIRA] Created: (HHH-2862) Collection is not associated with any session exception when doing an eager fetch on a non-unique collection.
by Paul Andrews (JIRA)
Collection is not associated with any session exception when doing an eager fetch on a non-unique collection.
-------------------------------------------------------------------------------------------------------------
Key: HHH-2862
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2862
Project: Hibernate3
Issue Type: Bug
Environment: Hibernate 3.1.3 - Hibernate 3.2.5, HSQLDB, Java5
Reporter: Paul Andrews
It is basically caused by having an eager collection where the key of the collection is not unique in the results.
The code works as follows in CollectionType.getCollection():
....
persistenceContext.addUninitializedCollection( persister, collection, key );
// some collections are not lazy:
if ( initializeImmediately( entityMode ) ) {
session.initializeCollection( collection, false );
}
else if ( !persister.isLazy() ) {
persistenceContext.addNonLazyCollection( collection );
}
if ( hasHolder( entityMode ) ) {
session.getPersistenceContext().addCollectionHolder( collection );
}
if persistenceContext.addUninitializedCollection() detects that the collection with the given key has already been added it clears the session on the old instance of the collection (sets it to null). However, that collection has already been added to the persistence context by an earlier call to this method. So later when StatefulPersistenceContext.initializeNonLazyCollections() is called it iterates through all of the collections in the persistence context (including those which have had their session set to null by addUninitializedCollection()), calling forceInitialization() which throws a 'collection is not associated with any session' exception.
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-1985) NodeTraverser is not SOE-safe
by Sergey Vladimirov (JIRA)
NodeTraverser is not SOE-safe
-----------------------------
Key: HHH-1985
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1985
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.2.0.cr3
Reporter: Sergey Vladimirov
Priority: Minor
org.hibernate.hql.ast.util.NodeTraverser
It is possible for java.lang.StackOverflowError to occur in NodeTraverser.java:41;42 with very deep tree. Need another algorith to visit whole tree.
08.08 19:50:09 ERROR [ArpSiteServlet] Servlet.service() for servlet ArpSiteServlet threw exception
java.lang.StackOverflowError
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-2288) Adding a new ResultTransformer, permitting to instantiate and fill related beans and not to take care of aliases case.
by Nicolas Billard (JIRA)
Adding a new ResultTransformer, permitting to instantiate and fill related beans and not to take care of aliases case.
----------------------------------------------------------------------------------------------------------------------
Key: HHH-2288
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2288
Project: Hibernate3
Type: Improvement
Components: query-sql, query-hql, query-criteria
Versions: 3.2.1
Environment: Developped based on hibernate v 3.2.1
Reporter: Nicolas Billard
Priority: Minor
Attachments: ResultTransformerImprovement.zip
Are joined to this post 2 classes. Below is the javadoc header of the ResultTransformer class.
May be this could be integrated in next hibernate versions ( certainly with improvements ... :p )
Let me know if anyone finds it useful ...
------------------------------------------------------
* Transforms resultset to value a bean, via setters.
*
* Examples:
*
* bean MyBean as 2 setters :
* - setId : takes an Integer
* - setProduct : takes a Product bean
*
* Product bean as 2 setters :
* - setId
* - setLib
*
* resultset may have these columns :
* - ID
* - PRODUCT_ID
* - PRODUCT_LIB
*
* A MyBean instance will be created for each tupple,
* and a Product instance will be also created, filled with PRODUCT_ID and PRODUCT_LIB values.
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-2501) Read-only state of an entity in a session to propagate into subsequently lazy-loaded entities.
by Gunther Schadow (JIRA)
Read-only state of an entity in a session to propagate into subsequently lazy-loaded entities.
----------------------------------------------------------------------------------------------
Key: HHH-2501
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2501
Project: Hibernate3
Type: Improvement
Components: core
Environment: any
Reporter: Gunther Schadow
ISSUE:
Given an Entity entity and after Session.setReadOnly(entity), if the entity has lazy collections, lazy properties etc., other Entities are loaded into the Session upon navigating the object graph in the default read-writable state. However, it seems more reasonable to maintain the read-only state of the owning object.
REQUEST:
Ability to propagate read-only state of an entity in a session into other lazy-loaded entities.
BACKGROUND:
We have a system which permits users to make concurrent transactions which involve many of the same objects. Usually no changes happen on these shared objects, but instead connections (links) are made between these objects and new objects. For example, say you have an online meeting system, and every Meeting held has a link to a number of User object. The User objects are never changed in a Meeting, but there is a Relation called Participation (of User in Meeting) to which new relationships are added. When a new meeting is saved, it wants to save the User objects simply because a new Participation link entry was added to the collection.
To an extent we can prevent this from happening by setting the Users explicitly to read-only. However, now suppose we added a function "Invite your Friends" to a Meeting, in which we would simply go:
for(User friend : currentUser.getFriends())
meeting.addInvitation(friend);
Now an Invitation is like a Participation, and would be added into the User but now it wants to save these users just for a version upgrade only because they have received an Invitation.
--
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, 11 months
[Hibernate-JIRA] Created: (HBX-1074) DelegatingReverseEngineeringStratey.columnToHibernateTypeName reports invalid values
by Joel Schuster (JIRA)
DelegatingReverseEngineeringStratey.columnToHibernateTypeName reports invalid values
------------------------------------------------------------------------------------
Key: HBX-1074
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1074
Project: Hibernate Tools
Issue Type: Improvement
Components: reverse-engineer
Affects Versions: 3.2.1
Environment: MyEclipse w/ Hibernate rev engineering against Oracle 10g
Reporter: Joel Schuster
When implementing an extention to the [u]DelegatingReverseEngineeringStrategy [/u]the [u]columnToHibernateTypeName [/u]does not report the true value of the [b]precision [/b]and [b]scale [/b]column of the table description/definition.
The method signature:
[code]@Override
public String columnToHibernateTypeName( TableIdentifier table, String columnName, int sqlType,
int length, int precision, int scale, boolean nullable,
boolean generatedIdentifier) {[/code]
The precision and scale parameters are [b]int[/b]. If the values in the definition are [b]null[/b] the values reported here come out as DATA_LENGTH and 0. Not null.
These parameters should be [b]Integer[/b] and be set to [b]null [/b]when applicable.
--
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, 11 months