Hibernate SVN: r21160 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria.
by hibernate-commits@lists.jboss.org
Author: brmeyer
Date: 2014-04-14 09:53:33 -0400 (Mon, 14 Apr 2014)
New Revision: 21160
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/OuterJoinCriteriaTest.java
Log:
JBPAPP-9893 correct OuterJoinCriteriaTest for Oracle
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/OuterJoinCriteriaTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/OuterJoinCriteriaTest.java 2014-02-20 18:28:51 UTC (rev 21159)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/OuterJoinCriteriaTest.java 2014-04-14 13:53:33 UTC (rev 21160)
@@ -30,8 +30,10 @@
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
+import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.Oracle9Dialect;
+import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.sql.JoinFragment;
@@ -39,7 +41,7 @@
* @author Mattias Jiderhamn
* @author Gail Badner
*/
-public class OuterJoinCriteriaTest extends FunctionalTestCase {
+public class OuterJoinCriteriaTest extends DatabaseSpecificFunctionalTestCase {
private Order order1;
private Order order2;
private Order order3;
@@ -51,14 +53,13 @@
public String[] getMappings() {
return new String[] { "criteria/Order.hbm.xml" };
}
+
+ @Override
+ public boolean appliesTo(Dialect dialect) {
+ return dialect.supportsIdentityColumns();
+ }
public void testSubcriteriaWithNonNullRestrictions() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -91,12 +92,6 @@
}
public void testSubcriteriaWithNonNullRestrictionsAliasToEntityMap() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -135,12 +130,6 @@
public void testSubcriteriaWithNullOrNonNullRestrictions() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -184,12 +173,6 @@
}
public void testSubcriteriaWithNullOrNonNullRestrictionsAliasToEntityMap() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -238,12 +221,6 @@
}
public void testAliasWithNonNullRestrictions() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -278,12 +255,6 @@
}
public void testAliasWithNullOrNonNullRestrictions() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();
@@ -325,12 +296,6 @@
}
public void testNonNullSubcriteriaRestrictionsOnRootCriteria() {
- if ( getDialect() instanceof Oracle9Dialect
- || getDialect() instanceof Oracle8iDialect) {
- // Does not support identity key generation.
- return;
- }
-
Session s = openSession();
s.getTransaction().begin();