HHH-3214 - Update unit tests and config files to use non-depracated Oracle dialects
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16100 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
81f2726bc2
commit
8095d02454
|
@ -114,7 +114,7 @@ public class OracleJoinFragment extends JoinFragment {
|
||||||
addLeftOuterJoinCondition( on );
|
addLeftOuterJoinCondition( on );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new UnsupportedOperationException( "join type not supported by OracleJoinFragment (use Oracle9Dialect)" );
|
throw new UnsupportedOperationException( "join type not supported by OracleJoinFragment (use Oracle9iDialect/Oracle10gDialect)" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3585,8 +3585,8 @@ public class Customer implements Serializable {
|
||||||
...
|
...
|
||||||
<database-object>
|
<database-object>
|
||||||
<definition class="MyTriggerDefinition"/>
|
<definition class="MyTriggerDefinition"/>
|
||||||
<dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle9iDialect"/>
|
||||||
<dialect-scope name="org.hibernate.dialect.OracleDialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/>
|
||||||
</database-object>
|
</database-object>
|
||||||
</hibernate-mapping>]]></programlisting>
|
</hibernate-mapping>]]></programlisting>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||||
other properties listed above. This means that you will not have to specify them manually.
|
other properties listed above. This means that you will not have to specify them manually.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table frame="topbot" id="sql-dialects" revision="2">
|
<table frame="topbot" id="sql-dialects" revision="3">
|
||||||
<title>Hibernate SQL Dialects (<literal>hibernate.dialect</literal>)</title>
|
<title>Hibernate SQL Dialects (<literal>hibernate.dialect</literal>)</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<!--
|
<!--
|
||||||
|
@ -1089,7 +1089,10 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||||
<entry>Oracle (any version)</entry> <entry><literal>org.hibernate.dialect.OracleDialect</literal></entry>
|
<entry>Oracle (any version)</entry> <entry><literal>org.hibernate.dialect.OracleDialect</literal></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Oracle 9i/10g</entry> <entry><literal>org.hibernate.dialect.Oracle9Dialect</literal></entry>
|
<entry>Oracle 9i</entry> <entry><literal>org.hibernate.dialect.Oracle9iDialect</literal></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Oracle 10g</entry> <entry><literal>org.hibernate.dialect.Oracle10gDialect</literal></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Sybase</entry> <entry><literal>org.hibernate.dialect.SybaseDialect</literal></entry>
|
<entry>Sybase</entry> <entry><literal>org.hibernate.dialect.SybaseDialect</literal></entry>
|
||||||
|
|
|
@ -59,8 +59,9 @@ hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
|
||||||
|
|
||||||
## Oracle
|
## Oracle
|
||||||
|
|
||||||
#hibernate.dialect org.hibernate.dialect.OracleDialect
|
#hibernate.dialect org.hibernate.dialect.Oracle8iDialect
|
||||||
#hibernate.dialect org.hibernate.dialect.Oracle9Dialect
|
#hibernate.dialect org.hibernate.dialect.Oracle9iDialect
|
||||||
|
#hibernate.dialect org.hibernate.dialect.Oracle10gDialect
|
||||||
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
||||||
#hibernate.connection.username ora
|
#hibernate.connection.username ora
|
||||||
#hibernate.connection.password ora
|
#hibernate.connection.password ora
|
||||||
|
|
|
@ -9,7 +9,6 @@ import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.junit.functional.FunctionalTestCase;
|
import org.hibernate.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -45,7 +44,7 @@ public class CompositeUserTypeTest extends FunctionalTestCase {
|
||||||
result = s.createQuery("from Transaction tran where tran.value.amount > 1.0 and tran.value.currency = 'AUD'").list();
|
result = s.createQuery("from Transaction tran where tran.value.amount > 1.0 and tran.value.currency = 'AUD'").list();
|
||||||
assertEquals( result.size(), 1 );
|
assertEquals( result.size(), 1 );
|
||||||
|
|
||||||
if ( !(getDialect() instanceof HSQLDialect) && ! (getDialect() instanceof Oracle9Dialect) ) {
|
if ( !(getDialect() instanceof HSQLDialect) ) {
|
||||||
|
|
||||||
result = s.createQuery("from Transaction txn where txn.value = (1.5, 'AUD')").list();
|
result = s.createQuery("from Transaction txn where txn.value = (1.5, 'AUD')").list();
|
||||||
assertEquals( result.size(), 1 );
|
assertEquals( result.size(), 1 );
|
||||||
|
|
|
@ -26,7 +26,6 @@ import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.InterbaseDialect;
|
import org.hibernate.dialect.InterbaseDialect;
|
||||||
import org.hibernate.dialect.MckoiDialect;
|
import org.hibernate.dialect.MckoiDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.TimesTenDialect;
|
import org.hibernate.dialect.TimesTenDialect;
|
||||||
import org.hibernate.dialect.function.SQLFunction;
|
import org.hibernate.dialect.function.SQLFunction;
|
||||||
|
@ -176,7 +175,6 @@ public class SQLFunctionsInterSystemsTest extends DatabaseSpecificFunctionalTest
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBroken() throws Exception {
|
public void testBroken() throws Exception {
|
||||||
if (getDialect() instanceof Oracle9Dialect) return;
|
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
Transaction t = s.beginTransaction();
|
Transaction t = s.beginTransaction();
|
||||||
Broken b = new Fixed();
|
Broken b = new Fixed();
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
<drop>
|
<drop>
|
||||||
<![CDATA[DROP TRIGGER t_iu_part_gen_comp]]>
|
<![CDATA[DROP TRIGGER t_iu_part_gen_comp]]>
|
||||||
</drop>
|
</drop>
|
||||||
<dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle9iDialect"/>
|
||||||
<dialect-scope name="org.hibernate.dialect.OracleDialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/>
|
||||||
</database-object>
|
</database-object>
|
||||||
|
|
||||||
</hibernate-mapping>
|
</hibernate-mapping>
|
|
@ -35,8 +35,8 @@
|
||||||
<drop>
|
<drop>
|
||||||
<![CDATA[DROP TRIGGER t_iu_gen_prop]]>
|
<![CDATA[DROP TRIGGER t_iu_gen_prop]]>
|
||||||
</drop>
|
</drop>
|
||||||
<dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle9iDialect"/>
|
||||||
<dialect-scope name="org.hibernate.dialect.OracleDialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/>
|
||||||
</database-object>
|
</database-object>
|
||||||
|
|
||||||
</hibernate-mapping>
|
</hibernate-mapping>
|
|
@ -5,7 +5,7 @@ import junit.framework.Test;
|
||||||
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ public class PartiallyGeneratedComponentTest extends DatabaseSpecificFunctionalT
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
return dialect instanceof Oracle9Dialect;
|
return dialect instanceof Oracle9iDialect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPartialComponentGeneration() {
|
public void testPartialComponentGeneration() {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
// $Id: TriggerGeneratedValuesWithCachingTest.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $
|
// $Id: TriggerGeneratedValuesWithCachingTest.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $
|
||||||
package org.hibernate.test.generated;
|
package org.hibernate.test.generated;
|
||||||
|
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of TriggerGeneratedValuesWithoutCachingTest.
|
* Implementation of TriggerGeneratedValuesWithoutCachingTest.
|
||||||
|
@ -26,7 +25,7 @@ public class TriggerGeneratedValuesWithCachingTest extends AbstractGeneratedProp
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
// currently have only defined triggers for oracle...
|
// currently have only defined triggers for oracle...
|
||||||
// TODO : add more triggers for dialects which allow mods in triggers...
|
// TODO : add more triggers for dialects which allow mods in triggers...
|
||||||
return ( dialect instanceof Oracle9Dialect );
|
return ( dialect instanceof Oracle9iDialect );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
|
|
|
@ -4,7 +4,7 @@ package org.hibernate.test.generated;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +25,7 @@ public class TriggerGeneratedValuesWithoutCachingTest extends AbstractGeneratedP
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
// currently have only defined triggers for oracle...
|
// currently have only defined triggers for oracle...
|
||||||
// TODO : add more triggers for dialects which allow mods in triggers...
|
// TODO : add more triggers for dialects which allow mods in triggers...
|
||||||
return ( dialect instanceof Oracle9Dialect );
|
return ( dialect instanceof Oracle9iDialect );
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCacheConcurrencyStrategy() {
|
public String getCacheConcurrencyStrategy() {
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
<drop>
|
<drop>
|
||||||
<![CDATA[DROP TRIGGER t_i_my_entity]]>
|
<![CDATA[DROP TRIGGER t_i_my_entity]]>
|
||||||
</drop>
|
</drop>
|
||||||
<dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle9iDialect"/>
|
||||||
<dialect-scope name="org.hibernate.dialect.OracleDialect"/>
|
<dialect-scope name="org.hibernate.dialect.Oracle10gDialect"/>
|
||||||
</database-object>
|
</database-object>
|
||||||
|
|
||||||
</hibernate-mapping>
|
</hibernate-mapping>
|
|
@ -3,9 +3,8 @@ package org.hibernate.test.generatedkeys.select;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.dialect.DataDirectOracle9Dialect;
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -24,7 +23,7 @@ public class SelectGeneratorTest extends DatabaseSpecificFunctionalTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
return ( dialect instanceof Oracle9Dialect );
|
return ( dialect instanceof Oracle9iDialect );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
|
@ -32,10 +31,6 @@ public class SelectGeneratorTest extends DatabaseSpecificFunctionalTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testJDBC3GetGeneratedKeysSupportOnOracle() {
|
public void testJDBC3GetGeneratedKeysSupportOnOracle() {
|
||||||
if ( getDialect() instanceof DataDirectOracle9Dialect ) {
|
|
||||||
reportSkip( "DataDirect drivers known to not support JDBC3 getGeneratedKeys for Oracle", "oracle getGeneratedKeys support" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Session session = openSession();
|
Session session = openSession();
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,8 @@ import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.cfg.Configuration;
|
import org.hibernate.cfg.Configuration;
|
||||||
import org.hibernate.dialect.DataDirectOracle9Dialect;
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -25,7 +24,7 @@ public class SequenceIdentityTest extends DatabaseSpecificFunctionalTestCase {
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
// the DataDirect driver for Oracle known to not support
|
// the DataDirect driver for Oracle known to not support
|
||||||
// JDBC3 getGeneratedKeys...
|
// JDBC3 getGeneratedKeys...
|
||||||
return ( dialect instanceof Oracle9Dialect ) && ( ! ( dialect instanceof DataDirectOracle9Dialect ) ) ;
|
return ( dialect instanceof Oracle9iDialect );
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getMappings() {
|
public String[] getMappings() {
|
||||||
|
|
|
@ -13,6 +13,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
|
@ -27,14 +29,14 @@ import org.hibernate.cfg.Environment;
|
||||||
import org.hibernate.dialect.DB2Dialect;
|
import org.hibernate.dialect.DB2Dialect;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle8iDialect;
|
||||||
|
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
import org.hibernate.dialect.SQLServerDialect;
|
import org.hibernate.dialect.SQLServerDialect;
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
|
||||||
import org.hibernate.dialect.Sybase11Dialect;
|
import org.hibernate.dialect.Sybase11Dialect;
|
||||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||||
import org.hibernate.dialect.SybaseAnywhereDialect;
|
import org.hibernate.dialect.SybaseAnywhereDialect;
|
||||||
import org.hibernate.dialect.Oracle8iDialect;
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.hql.ast.ASTQueryTranslatorFactory;
|
import org.hibernate.hql.ast.ASTQueryTranslatorFactory;
|
||||||
import org.hibernate.junit.functional.FunctionalTestCase;
|
import org.hibernate.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
@ -54,9 +56,6 @@ import org.hibernate.type.ManyToOneType;
|
||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
import org.hibernate.util.StringHelper;
|
import org.hibernate.util.StringHelper;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the integration of the new AST parser into the loading of query results using
|
* Tests the integration of the new AST parser into the loading of query results using
|
||||||
* the Hibernate persisters and loaders.
|
* the Hibernate persisters and loaders.
|
||||||
|
@ -1242,7 +1241,7 @@ public class ASTParserLoadingTest extends FunctionalTestCase {
|
||||||
String dateStr1 = (String) session.createQuery("select str(current_date) from Animal").uniqueResult();
|
String dateStr1 = (String) session.createQuery("select str(current_date) from Animal").uniqueResult();
|
||||||
String dateStr2 = (String) session.createQuery("select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal").uniqueResult();
|
String dateStr2 = (String) session.createQuery("select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal").uniqueResult();
|
||||||
System.out.println(dateStr1 + '=' + dateStr2);
|
System.out.println(dateStr1 + '=' + dateStr2);
|
||||||
if ( ! ( getDialect() instanceof Oracle9Dialect || getDialect() instanceof Oracle8iDialect ) ) { //Oracle renders the name of the month :(
|
if ( ! ( getDialect() instanceof Oracle8iDialect ) ) { //Oracle renders the name of the month :(
|
||||||
String[] dp1 = StringHelper.split("-", dateStr1);
|
String[] dp1 = StringHelper.split("-", dateStr1);
|
||||||
String[] dp2 = StringHelper.split("-", dateStr2);
|
String[] dp2 = StringHelper.split("-", dateStr2);
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
|
|
|
@ -14,18 +14,16 @@ import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.QueryException;
|
import org.hibernate.QueryException;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
|
||||||
import org.hibernate.dialect.DB2Dialect;
|
import org.hibernate.dialect.DB2Dialect;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle8iDialect;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
import org.hibernate.dialect.SQLServerDialect;
|
import org.hibernate.dialect.SQLServerDialect;
|
||||||
import org.hibernate.dialect.SybaseAnywhereDialect;
|
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
|
||||||
import org.hibernate.dialect.Sybase11Dialect;
|
import org.hibernate.dialect.Sybase11Dialect;
|
||||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||||
import org.hibernate.dialect.Oracle8iDialect;
|
import org.hibernate.dialect.SybaseAnywhereDialect;
|
||||||
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.function.SQLFunction;
|
import org.hibernate.dialect.function.SQLFunction;
|
||||||
import org.hibernate.engine.SessionFactoryImplementor;
|
import org.hibernate.engine.SessionFactoryImplementor;
|
||||||
import org.hibernate.engine.query.HQLQueryPlan;
|
import org.hibernate.engine.query.HQLQueryPlan;
|
||||||
|
@ -38,9 +36,10 @@ import org.hibernate.hql.ast.QuerySyntaxException;
|
||||||
import org.hibernate.hql.ast.QueryTranslatorImpl;
|
import org.hibernate.hql.ast.QueryTranslatorImpl;
|
||||||
import org.hibernate.hql.ast.tree.ConstructorNode;
|
import org.hibernate.hql.ast.tree.ConstructorNode;
|
||||||
import org.hibernate.hql.ast.tree.DotNode;
|
import org.hibernate.hql.ast.tree.DotNode;
|
||||||
|
import org.hibernate.hql.ast.tree.FromReferenceNode;
|
||||||
import org.hibernate.hql.ast.tree.IndexNode;
|
import org.hibernate.hql.ast.tree.IndexNode;
|
||||||
import org.hibernate.hql.ast.tree.SelectClause;
|
import org.hibernate.hql.ast.tree.SelectClause;
|
||||||
import org.hibernate.hql.ast.tree.FromReferenceNode;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests cases where the AST based query translator and the 'classic' query translator generate identical SQL.
|
* Tests cases where the AST based query translator and the 'classic' query translator generate identical SQL.
|
||||||
|
@ -677,7 +676,6 @@ public class HQLTest extends QueryTranslatorTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGroupByFunction() {
|
public void testGroupByFunction() {
|
||||||
if ( getDialect() instanceof Oracle9Dialect ) return;
|
|
||||||
if ( getDialect() instanceof Oracle8iDialect ) return; // the new hiearchy...
|
if ( getDialect() instanceof Oracle8iDialect ) return; // the new hiearchy...
|
||||||
if ( getDialect() instanceof PostgreSQLDialect ) return;
|
if ( getDialect() instanceof PostgreSQLDialect ) return;
|
||||||
assertTranslation( "select count(*) from Human h group by year(h.birthdate)" );
|
assertTranslation( "select count(*) from Human h group by year(h.birthdate)" );
|
||||||
|
@ -856,7 +854,6 @@ public class HQLTest extends QueryTranslatorTestCase {
|
||||||
public void testClassProperty() throws Exception {
|
public void testClassProperty() throws Exception {
|
||||||
// This test causes failures on theta-join dialects because the SQL is different.
|
// This test causes failures on theta-join dialects because the SQL is different.
|
||||||
// The queries are semantically the same however.
|
// The queries are semantically the same however.
|
||||||
if ( getDialect() instanceof Oracle9Dialect ) return;
|
|
||||||
if ( getDialect() instanceof Oracle8iDialect ) return;
|
if ( getDialect() instanceof Oracle8iDialect ) return;
|
||||||
assertTranslation( "from Animal a where a.mother.class = Reptile" );
|
assertTranslation( "from Animal a where a.mother.class = Reptile" );
|
||||||
}
|
}
|
||||||
|
@ -1132,7 +1129,6 @@ public class HQLTest extends QueryTranslatorTestCase {
|
||||||
// This test causes failures on theta-join dialects because the SQL is different. The old parser
|
// This test causes failures on theta-join dialects because the SQL is different. The old parser
|
||||||
// duplicates the condition, whereas the new parser does not. The queries are semantically the
|
// duplicates the condition, whereas the new parser does not. The queries are semantically the
|
||||||
// same however.
|
// same however.
|
||||||
if ( getDialect() instanceof Oracle9Dialect ) return;
|
|
||||||
if ( getDialect() instanceof Oracle8iDialect ) return;
|
if ( getDialect() instanceof Oracle8iDialect ) return;
|
||||||
assertTranslation( "select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10" );
|
assertTranslation( "select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10" );
|
||||||
assertTranslation( "select an.mother.bodyWeight from Animal an where an.mother.bodyWeight > 10" );
|
assertTranslation( "select an.mother.bodyWeight from Animal an where an.mother.bodyWeight > 10" );
|
||||||
|
|
|
@ -51,19 +51,18 @@ import org.hibernate.dialect.InterbaseDialect;
|
||||||
import org.hibernate.dialect.MckoiDialect;
|
import org.hibernate.dialect.MckoiDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle8iDialect;
|
import org.hibernate.dialect.Oracle8iDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
//import org.hibernate.dialect.Oracle9Dialect;
|
||||||
import org.hibernate.dialect.OracleDialect;
|
//import org.hibernate.dialect.OracleDialect;
|
||||||
import org.hibernate.dialect.PointbaseDialect;
|
import org.hibernate.dialect.PointbaseDialect;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
import org.hibernate.dialect.SAPDBDialect;
|
import org.hibernate.dialect.SAPDBDialect;
|
||||||
import org.hibernate.dialect.SQLServerDialect;
|
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
|
||||||
import org.hibernate.dialect.Sybase11Dialect;
|
import org.hibernate.dialect.Sybase11Dialect;
|
||||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||||
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.TimesTenDialect;
|
import org.hibernate.dialect.TimesTenDialect;
|
||||||
import org.hibernate.engine.SessionFactoryImplementor;
|
import org.hibernate.engine.SessionFactoryImplementor;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
import org.hibernate.mapping.RootClass;
|
//import org.hibernate.mapping.RootClass;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import org.hibernate.proxy.HibernateProxy;
|
||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
import org.hibernate.util.JoinedIterator;
|
import org.hibernate.util.JoinedIterator;
|
||||||
|
@ -99,13 +98,6 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void configure(Configuration cfg) {
|
|
||||||
super.configure( cfg );
|
|
||||||
if ( Dialect.getDialect() instanceof OracleDialect ) {
|
|
||||||
( (RootClass) cfg.getClassMapping("org.hibernate.test.legacy.Foo") ).setForceDiscriminator(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return new FunctionalTestClassTestSuite( FooBarTest.class );
|
return new FunctionalTestClassTestSuite( FooBarTest.class );
|
||||||
}
|
}
|
||||||
|
@ -682,7 +674,7 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
s.find("from Foo foo where foo.integer not between 1 and 5 and foo.string not in ('cde', 'abc') and foo.string is not null and foo.integer<=3");
|
s.find("from Foo foo where foo.integer not between 1 and 5 and foo.string not in ('cde', 'abc') and foo.string is not null and foo.integer<=3");
|
||||||
|
|
||||||
s.find("from Baz baz inner join baz.collectionComponent.nested.foos foo where foo.string is null");
|
s.find("from Baz baz inner join baz.collectionComponent.nested.foos foo where foo.string is null");
|
||||||
if ( !(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof SAPDBDialect) && !(getDialect() instanceof PointbaseDialect) /*&& !(dialect instanceof Oracle9Dialect)*/ ) {
|
if ( !(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof SAPDBDialect) && !(getDialect() instanceof PointbaseDialect) ) {
|
||||||
s.find("from Baz baz inner join baz.fooSet where '1' in (from baz.fooSet foo where foo.string is not null)");
|
s.find("from Baz baz inner join baz.fooSet where '1' in (from baz.fooSet foo where foo.string is not null)");
|
||||||
s.find("from Baz baz where 'a' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)");
|
s.find("from Baz baz where 'a' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)");
|
||||||
s.find("from Baz baz where 'b' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)");
|
s.find("from Baz baz where 'b' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)");
|
||||||
|
@ -2138,7 +2130,7 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
s.find("select count(*) from Baz as baz where 1 in indices(baz.fooArray)");
|
s.find("select count(*) from Baz as baz where 1 in indices(baz.fooArray)");
|
||||||
s.find("select count(*) from Bar as bar where 'abc' in elements(bar.baz.fooArray)");
|
s.find("select count(*) from Bar as bar where 'abc' in elements(bar.baz.fooArray)");
|
||||||
s.find("select count(*) from Bar as bar where 1 in indices(bar.baz.fooArray)");
|
s.find("select count(*) from Bar as bar where 1 in indices(bar.baz.fooArray)");
|
||||||
if ( !(getDialect() instanceof DB2Dialect) && !(getDialect() instanceof Oracle9Dialect) && !(getDialect() instanceof Oracle8iDialect ) && !( getDialect() instanceof SybaseDialect ) && !( getDialect() instanceof Sybase11Dialect ) && !( getDialect() instanceof SybaseASE15Dialect )) {
|
if ( !(getDialect() instanceof DB2Dialect) && !(getDialect() instanceof Oracle8iDialect ) && !( getDialect() instanceof SybaseDialect ) && !( getDialect() instanceof Sybase11Dialect ) && !( getDialect() instanceof SybaseASE15Dialect )) {
|
||||||
// SybaseAnywhereDialect supports implicit conversions from strings to ints
|
// SybaseAnywhereDialect supports implicit conversions from strings to ints
|
||||||
s.find("select count(*) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)");
|
s.find("select count(*) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)");
|
||||||
s.find("select max( elements(bar.baz.fooArray) ) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)");
|
s.find("select max( elements(bar.baz.fooArray) ) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)");
|
||||||
|
@ -3304,7 +3296,16 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testScrollableIterator() throws Exception {
|
public void testScrollableIterator() throws Exception {
|
||||||
if ( getDialect() instanceof DB2Dialect || getDialect() instanceof OracleDialect || getDialect() instanceof SybaseDialect || getDialect() instanceof HSQLDialect ) {
|
// skip if not one of these named dialects
|
||||||
|
boolean match = getDialect() instanceof DB2Dialect
|
||||||
|
|| getDialect() instanceof SybaseDialect
|
||||||
|
|| getDialect() instanceof HSQLDialect
|
||||||
|
|| getDialect() instanceof Oracle8iDialect // 9i/10g too because of inheritence...
|
||||||
|
;
|
||||||
|
if ( ! match ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
Transaction txn = s.beginTransaction();
|
Transaction txn = s.beginTransaction();
|
||||||
s.save( new Foo() );
|
s.save( new Foo() );
|
||||||
|
@ -3371,7 +3372,6 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
txn.commit();
|
txn.commit();
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void testMultiColumnQueries() throws Exception {
|
public void testMultiColumnQueries() throws Exception {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
|
|
|
@ -8,7 +8,6 @@ import junit.framework.Test;
|
||||||
import org.hibernate.LockMode;
|
import org.hibernate.LockMode;
|
||||||
import org.hibernate.classic.Session;
|
import org.hibernate.classic.Session;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.OracleDialect;
|
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,7 +28,7 @@ public class IJTest extends LegacyTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFormulaDiscriminator() throws Exception {
|
public void testFormulaDiscriminator() throws Exception {
|
||||||
if ( ( getDialect() instanceof OracleDialect ) || ( getDialect() instanceof HSQLDialect ) ) return;
|
if ( getDialect() instanceof HSQLDialect ) return;
|
||||||
Session s = getSessions().openSession();
|
Session s = getSessions().openSession();
|
||||||
I i = new I();
|
I i = new I();
|
||||||
i.setName( "i" );
|
i.setName( "i" );
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.hibernate.criterion.Restrictions;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.MckoiDialect;
|
import org.hibernate.dialect.MckoiDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.dialect.SAPDBDialect;
|
import org.hibernate.dialect.SAPDBDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
import org.hibernate.mapping.MetaAttribute;
|
import org.hibernate.mapping.MetaAttribute;
|
||||||
|
@ -316,7 +315,7 @@ public class MasterDetailTest extends LegacyTestCase {
|
||||||
assertTrue( "generated id returned", s.save(d2)!=null);
|
assertTrue( "generated id returned", s.save(d2)!=null);
|
||||||
master.addDetail(d1);
|
master.addDetail(d1);
|
||||||
master.addDetail(d2);
|
master.addDetail(d2);
|
||||||
if ( !(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof Oracle9Dialect) && !(getDialect() instanceof SAPDBDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof org.hibernate.dialect.TimesTenDialect)) {
|
if ( !(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof SAPDBDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof org.hibernate.dialect.TimesTenDialect)) {
|
||||||
assertTrue(
|
assertTrue(
|
||||||
"query",
|
"query",
|
||||||
s.find("from Detail d, Master m where m = d.master and size(m.outgoing) = 0 and size(m.incoming) = 0").size()==2
|
s.find("from Detail d, Master m where m = d.master and size(m.outgoing) = 0 and size(m.incoming) = 0").size()==2
|
||||||
|
|
|
@ -23,14 +23,13 @@ import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.InterbaseDialect;
|
import org.hibernate.dialect.InterbaseDialect;
|
||||||
import org.hibernate.dialect.MckoiDialect;
|
import org.hibernate.dialect.MckoiDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.dialect.OracleDialect;
|
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.Sybase11Dialect;
|
import org.hibernate.dialect.Sybase11Dialect;
|
||||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||||
import org.hibernate.dialect.SybaseAnywhereDialect;
|
import org.hibernate.dialect.SybaseAnywhereDialect;
|
||||||
import org.hibernate.dialect.TimesTenDialect;
|
import org.hibernate.dialect.TimesTenDialect;
|
||||||
import org.hibernate.dialect.SQLServerDialect;
|
import org.hibernate.dialect.SQLServerDialect;
|
||||||
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.dialect.function.SQLFunction;
|
import org.hibernate.dialect.function.SQLFunction;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -84,7 +83,7 @@ public class SQLFunctionsTest extends LegacyTestCase {
|
||||||
s.find("select count(*) from Simple s").size() == 1
|
s.find("select count(*) from Simple s").size() == 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( getDialect() instanceof OracleDialect) {
|
if ( getDialect() instanceof Oracle9iDialect ) {
|
||||||
// Check Oracle Dialect mix of dialect functions - no args (no parenthesis and single arg functions
|
// Check Oracle Dialect mix of dialect functions - no args (no parenthesis and single arg functions
|
||||||
java.util.List rset = s.find("select s.name, sysdate(), trunc(s.pay), round(s.pay) from Simple s");
|
java.util.List rset = s.find("select s.name, sysdate(), trunc(s.pay), round(s.pay) from Simple s");
|
||||||
assertNotNull("Name string should have been returned",(((Object[])rset.get(0))[0]));
|
assertNotNull("Name string should have been returned",(((Object[])rset.get(0))[0]));
|
||||||
|
@ -185,7 +184,6 @@ public class SQLFunctionsTest extends LegacyTestCase {
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
public void testBroken() throws Exception {
|
public void testBroken() throws Exception {
|
||||||
if (getDialect() instanceof Oracle9Dialect) return;
|
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
Transaction t = s.beginTransaction();
|
Transaction t = s.beginTransaction();
|
||||||
Broken b = new Fixed();
|
Broken b = new Fixed();
|
||||||
|
|
|
@ -14,8 +14,6 @@ import org.hibernate.Transaction;
|
||||||
import org.hibernate.classic.Session;
|
import org.hibernate.classic.Session;
|
||||||
import org.hibernate.dialect.HSQLDialect;
|
import org.hibernate.dialect.HSQLDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.dialect.OracleDialect;
|
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
import org.hibernate.dialect.TimesTenDialect;
|
import org.hibernate.dialect.TimesTenDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
@ -47,7 +45,6 @@ public class SQLLoaderTest extends LegacyTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTS() throws Exception {
|
public void testTS() throws Exception {
|
||||||
if (getDialect() instanceof Oracle9Dialect) return;
|
|
||||||
Session session = openSession();
|
Session session = openSession();
|
||||||
Transaction txn = session.beginTransaction();
|
Transaction txn = session.beginTransaction();
|
||||||
Simple sim = new Simple();
|
Simple sim = new Simple();
|
||||||
|
@ -150,7 +147,6 @@ public class SQLLoaderTest extends LegacyTestCase {
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
if ( getDialect() instanceof MySQLDialect ) return;
|
if ( getDialect() instanceof MySQLDialect ) return;
|
||||||
if ( getDialect() instanceof OracleDialect ) return; // todo : this fails on Oracle8 also
|
|
||||||
|
|
||||||
s = openSession();
|
s = openSession();
|
||||||
|
|
||||||
|
@ -341,11 +337,7 @@ public class SQLLoaderTest extends LegacyTestCase {
|
||||||
session = openSession();
|
session = openSession();
|
||||||
|
|
||||||
Query query;
|
Query query;
|
||||||
if ( getDialect() instanceof OracleDialect ) {
|
if( getDialect() instanceof TimesTenDialect) {
|
||||||
// Oracle8 does not support X/Open extension functions :)
|
|
||||||
query = session.createSQLQuery("select identifier_column as {a.id}, clazz_discriminata as {a.class}, count_ as {a.count}, name as {a.name} from TA where upper(name) like upper('max')", "a", A.class);
|
|
||||||
}
|
|
||||||
else if( getDialect() instanceof TimesTenDialect) {
|
|
||||||
// TimesTen does not permit general expressions (like UPPER) in the second part of a LIKE expression,
|
// TimesTen does not permit general expressions (like UPPER) in the second part of a LIKE expression,
|
||||||
// so we execute a similar test
|
// so we execute a similar test
|
||||||
query = session.createSQLQuery("select identifier_column as {a.id}, clazz_discriminata as {a.class}, count_ as {a.count}, name as {a.name} from TA where {fn ucase(name)} like 'MAX'", "a", A.class);
|
query = session.createSQLQuery("select identifier_column as {a.id}, clazz_discriminata as {a.class}, count_ as {a.count}, name as {a.name} from TA where {fn ucase(name)} like 'MAX'", "a", A.class);
|
||||||
|
|
|
@ -10,8 +10,8 @@ import junit.framework.Test;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.engine.SessionFactoryImplementor;
|
import org.hibernate.engine.SessionFactoryImplementor;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class RowIdTest extends DatabaseSpecificFunctionalTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
return dialect instanceof Oracle9Dialect;
|
return dialect instanceof Oracle9iDialect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean createSchema() {
|
public boolean createSchema() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package org.hibernate.test.sql.check;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +21,7 @@ public class OracleCheckStyleTest extends ResultCheckStyleTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
return dialect instanceof Oracle9Dialect;
|
return dialect instanceof Oracle9iDialect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
|
|
|
@ -3,9 +3,8 @@ package org.hibernate.test.sql.hand.custom.oracle;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.dialect.DataDirectOracle9Dialect;
|
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.dialect.Oracle9Dialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
import org.hibernate.test.sql.hand.custom.CustomStoredProcTestSupport;
|
import org.hibernate.test.sql.hand.custom.CustomStoredProcTestSupport;
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ public class OracleCustomSQLTest extends CustomStoredProcTestSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean appliesTo(Dialect dialect) {
|
public boolean appliesTo(Dialect dialect) {
|
||||||
return ( dialect instanceof Oracle9Dialect ) && !( dialect instanceof DataDirectOracle9Dialect );
|
return ( dialect instanceof Oracle9iDialect );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue