[Hibernate-JIRA] Commented: (HHH-1123) Cannot put more than 1000 elements in a InExpression
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123?page=c... ]
Strong Liu commented on HHH-1123:
---------------------------------
add a note to test the email notification
> Cannot put more than 1000 elements in a InExpression
> ----------------------------------------------------
>
> Key: HHH-1123
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc2, 3.2.0.alpha1
> Environment: Oracle 9i
> Reporter: Alexis Seigneurin
> Assignee: Strong Liu
> Attachments: Animal.hbm.xml, hibernate-inexpression-oracle-3.2.patch, LongInElementsTest.java, patch.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.
> Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
> (entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in (?))
> The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).
--
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
13 years, 10 months
[Hibernate-JIRA] Created: (HHH-5345) Possible NPE in DatasourceConnectionProvider
by Olivier Lamy (JIRA)
Possible NPE in DatasourceConnectionProvider
--------------------------------------------
Key: HHH-5345
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5345
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.3
Reporter: Olivier Lamy
Here my log
{code}
Caused by: java.lang.NullPointerException
at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
at org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:304)
at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:572)
at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)
at org.hibernate.loader.Loader.doQuery(Loader.java:770)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:241)
at com.accor.tars.configuration.mapping.jpa.SybaseServerDaoJpa.getAllSybaseServers(SybaseServerDaoJpa.java:56)
at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy190.getAllSybaseServers(Unknown Source)
{code}
--
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
13 years, 10 months
[Hibernate-JIRA] Created: (HHH-5351) Extra join is getting created in Hibernate 3.5.2.
by Pravin Ramhari Pawde (JIRA)
Extra join is getting created in Hibernate 3.5.2.
-------------------------------------------------
Key: HHH-5351
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5351
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.5.2
Environment: Hibernate-3.5.2-Final, Oracle 10g
Reporter: Pravin Ramhari Pawde
I had written a code for hibernate verion 3.3 and was working fine.
bellow is the query::
=========================
SELECT DISTINCT employee0_.employee_id AS empl2_321_0_
FROM employee employee0_
LEFT OUTER JOIN department department1_
ON employee0_.station_id = department1_.department_id
WHERE employee0_.discriminator = 'DEPARTMENT'
AND employee0_.active = ?
AND ( department1_.department_id IN ( ?, ? )
OR department1_.parent_department_id IN ( ?, ? )
OR employee0_.station_id IS NULL )
AND ( employee0_.type_identifier IS NULL
OR employee0_.type_identifier <>? )
========================================================
After I moved to Hibernate version 3.5.2
bellow is the query::
========================
SELECT DISTINCT employee0_.employee_id AS empl2_321_0_
FROM employee employee0_
LEFT OUTER JOIN department department1_
ON employee0_.station_id = department1_.facility_id,
department facility2_
WHERE department0_.discriminator = 'DEPARTMENT'
AND employee0_.station_id = facility2_.facility_id
AND employee0_.active = 'true'
AND ( department1_.department_id IN ( ?, ? )
OR department1_.parent_department_id IN ( ?, ? )
OR employee0_.station_id IS NULL )
AND ( employee0_.type_identifier IS NULL
OR employee0_.type_identifier <>? )
--
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
13 years, 10 months
[Hibernate-JIRA] Created: (HHH-5360) Poor batch insert performance when inserting different objects
by Koen Verrecken (JIRA)
Poor batch insert performance when inserting different objects
--------------------------------------------------------------
Key: HHH-5360
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5360
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.2
Reporter: Koen Verrecken
Batch insert works nicely when you only have one object to insert:
for (int i = 0; i < 20; i++) {
Book book = new Book();
dao.save(book);
}
Provided that the batch size in Hibernate is set to 20, Hibernate will correctly batch up to 20 insert statements and execute the batch at the end.
However, the following code example gives a different result:
for (int i = 0; i < 20; i++) {
Book book = new Book();
Author author = new Author();
dao.save(book);
dao.save(author);
}
In this case Hibernate will execute every single insert as a separate batch query. The result is 40 different insert statements fired at the database instead of 2.
In the org.hibernate.jdbc.AbstractBatcher class I found a probable reason for this behaviour. The prepareBatchStatement method checks if the current sql is the same as the sql of the previous statement. If so, the previous prepared statement will be reused. This is never the case for my 2nd example above, where Hibernate continuously switches between "insert into Book..." and "insert into Author" statements.
Would it be possible to cache more than one prepared statement?
--
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
13 years, 10 months
[Hibernate-JIRA] Created: (HHH-5377) Criteria.createCriteria() doesn't "root" at last associated entity
by Will Sumekar (JIRA)
Criteria.createCriteria() doesn't "root" at last associated entity
------------------------------------------------------------------
Key: HHH-5377
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5377
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.5.3
Environment: Windows XP, JDK 1.6.0_07, Hibernate 3.5.3, Oracle 10g
Reporter: Will Sumekar
When you call createCriteria() and then createAlias() on separate lines it still refers to the first entity.
q = session.createCriteria(Maps.class).createAlias("Wafers", "w");
q.createCriteria("Devices", "d");
q.createAlias("PrisProduct", "pp");
This doesn't work as hibernate thinks that parent of pp is Maps (first entity) while the parent of pp should be Devices.
But if you do:
q = session.createCriteria(Maps.class).createAlias("Wafers", "w");
q.createCriteria("Devices", "d").createAlias("PrisProduct", "pp");
This works.
--
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
13 years, 10 months