mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-28 06:49:09 +00:00
HHH-5220 HHH-5231 : Fix unit test failures and DB lockups for SELECT COUNT(DISTINCT arg1, arg2) tests
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19722 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
c53359d468
commit
9e6d8be376
@ -131,8 +131,11 @@ public String getReadLockString(int timeout) {
|
||||
* HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this
|
||||
* method here. Reopen this issue if you found/know 8 supports it.
|
||||
*/
|
||||
public boolean supportsRowValueConstructorSyntaxInInList() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsRowValueConstructorSyntaxInInList() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsTupleDistinctCounts() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -164,4 +164,8 @@ public boolean doesReadCommittedCauseWritersToBlockReaders() {
|
||||
public boolean doesRepeatableReadCauseReadersToBlockWriters() {
|
||||
return false; // here assume SQLServer2005 using snapshot isolation, which does not have this problem
|
||||
}
|
||||
|
||||
public boolean supportsTupleDistinctCounts() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
@ -33,6 +34,12 @@ public CriteriaHQLAlignmentTest(String x) {
|
||||
SelectClause.VERSION2_SQL = true;
|
||||
}
|
||||
|
||||
public String[] getMappings() {
|
||||
return new String[] {
|
||||
"hql/Animal.hbm.xml",
|
||||
};
|
||||
}
|
||||
|
||||
public boolean createSchema() {
|
||||
return true; // needed for the Criteria return type test
|
||||
}
|
||||
@ -119,6 +126,7 @@ public void testHQLAggregationReturnType() {
|
||||
// HHH-1724 Align Criteria with HQL aggregation return types.
|
||||
public void testCriteriaAggregationReturnType() {
|
||||
Session s = openSession();
|
||||
s.beginTransaction();
|
||||
Human human = new Human();
|
||||
human.setBigIntegerValue( new BigInteger("42") );
|
||||
human.setBigDecimalValue( new BigDecimal(45) );
|
||||
@ -172,6 +180,7 @@ public void testCriteriaAggregationReturnType() {
|
||||
|
||||
s.delete( human );
|
||||
s.flush();
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
}
|
||||
|
||||
@ -224,7 +233,7 @@ public void testCountReturnValues() {
|
||||
.setProjection( Projections.count( "nickName" ).setDistinct() )
|
||||
.uniqueResult();
|
||||
assertEquals( 2, count.longValue() );
|
||||
s.clear();
|
||||
s.close();
|
||||
|
||||
s = openSession();
|
||||
t = s.beginTransaction();
|
||||
@ -336,5 +345,4 @@ public void testCountReturnValues() {
|
||||
t.commit();
|
||||
s.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user