[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-3743) MININDEX function applied on entity of many-to-many mapped collection yields incorrect SQL
by Stefan Wachter (JIRA)
MININDEX function applied on entity of many-to-many mapped collection yields incorrect SQL
------------------------------------------------------------------------------------------
Key: HHH-3743
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3743
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1, org.hibernate.dialect.DerbyDialect and org.hibernate.dialect.MySQLInnoDBDialect
Reporter: Stefan Wachter
I have a "t_Person" entity with a "many-to-many" list to a "t_Address" entity:
<class entity-name="t_Person" table="F5_T_PERSON" lazy="true">
<id name="_id" column="ID" type="long">
<generator class="native"/>
</id>
<list lazy="true" cascade="all" name="elemAddress" table="F5_T_PERSON_ELM_ADDRESS">
<key column="OWNER_KEY"/>
<list-index column="IDX"/>
<many-to-many column="FOREIGN_KEY" entity-name="t_Address"/>
</list>
</class>
<class entity-name="t_Address" table="F5_T_ADDRESS" lazy="true">
<id name="_id" column="ID" type="long">
<generator class="native"/>
</id>
<property name="attrStreet" type="string">
<column name="A_STREET"/>
</property>
</class>
When I try to retrieve the minimum index of address entities using the following HQL
select MININDEX(a) from t_Person as p join p.elemAddress as a
incorrect SQL results:
select min(t_address2_.IDX) as col_0_0_ from F5_T_PERSON t_person0_ inner join F5_T_PERSON_ELM_ADDRESS elemaddres1_ on t_person0_.ID=elemaddres1_.OWNER_KEY inner join F5_T_ADDRESS t_address2_ on elemaddres1_.FOREIGN_KEY=t_address2_.ID
In particular the addressed column "t_address2_.IDX" does not exists. Instead "elemaddres1_.IDX" should be used because the index column is contained in the join table "F5_T_PERSON_ELM_ADDRESS".
I assume that the MININDEX function does not consider the case when it is applied to an element of a many-to-many collection.
I tested this with the DerbyDialect and the MySQLInnoDBDialect.
--
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-3938) One-To-One Filter Applied, Non-Lazy Fetch Problem
by Sandeep Vaid (JIRA)
One-To-One Filter Applied, Non-Lazy Fetch Problem
-------------------------------------------------
Key: HHH-3938
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3938
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.1
Reporter: Sandeep Vaid
Priority: Critical
Suppose i have one-to-one association between Product and ProductBasic. and we have applied filter on ProductBasic Class.
I have applied this filter as in Java side we have one-to-one relationship between Product and ProductBasic BUT at database side
we have one-to-many relationship between PRODUCT and PRODUCTBASIC. and we apply a condition (STARTTIME < CURRETTIME < ENDTIME)
while fetching PRODUCTBASIC, and this will always give me one record out of many.
So i have put this condition as filter in ProductBasic class.
In current hibernate, one-to-one associations are always non-lazily fetched. Moreover it doesn't apply filter conditions.
I understand that it can;t apply filter condition as some filter parameter must be provided at runtime and
user may not provide them (as he is not asking for ProductBasic)... Also in this case, proper proxy can't be created as
until we apply the filter criteria, we won't get one ProductBasic row (among many)..
I think hibernate code should be changed so that if a filter is declared on the associated class (ProductBasic in our case),
hibernate should return null for ProductBasic.
--
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-3828) Criteria: Restriction whith class does not work
by Kai Prünte (JIRA)
Criteria: Restriction whith class does not work
-----------------------------------------------
Key: HHH-3828
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3828
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.3.1
Environment: Oracle, HSQLDB
Reporter: Kai Prünte
The following line does not work:
Restrictions.eq("class", Bike.class)
because
SingleTableEntityPersister.getDiscriminatorSQLValue()
returns the discriminator value quoted with single quotes. However JDBC needs the string without quotes.
Workaround:
Restrictions.eq("class", Bike.class.getName())
This works fine for the default discriminator values
Patch in CriteriaQueryTranslator.getTypedValue(Criteria subcriteria, String propertyName, Object value):
if(stringValue != null && stringValue.length() > 2 && stringValue.startsWith("'") && stringValue.endsWith("'") ) {
// remove the single quotes
stringValue = stringValue.substring(1, stringValue.length() - 1);
}
--
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