[hibernate-commits] Hibernate SVN: r11664 - branches/Branch_3_2/Hibernate3/test/org/hibernate/test/hql.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Fri Jun 8 14:18:53 EDT 2007
Author: steve.ebersole at jboss.com
Date: 2007-06-08 14:18:53 -0400 (Fri, 08 Jun 2007)
New Revision: 11664
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java
Log:
HHH-2665 : oracle dialects
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2007-06-08 18:18:40 UTC (rev 11663)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java 2007-06-08 18:18:53 UTC (rev 11664)
@@ -13,6 +13,8 @@
import java.util.Map;
import junit.framework.Test;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
@@ -27,6 +29,7 @@
import org.hibernate.dialect.DB2Dialect;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.Oracle9Dialect;
import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.dialect.SQLServerDialect;
@@ -50,9 +53,6 @@
import org.hibernate.type.Type;
import org.hibernate.util.StringHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* Tests the integration of the new AST parser into the loading of query results using
* the Hibernate persisters and loaders.
@@ -1153,7 +1153,7 @@
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();
System.out.println(dateStr1 + '=' + dateStr2);
- if ( ! ( getDialect() instanceof Oracle9Dialect ) ) { //Oracle renders the name of the month :(
+ if ( ! ( getDialect() instanceof Oracle9Dialect || getDialect() instanceof Oracle8iDialect ) ) { //Oracle renders the name of the month :(
String[] dp1 = StringHelper.split("-", dateStr1);
String[] dp2 = StringHelper.split("-", dateStr2);
for (int i=0; i<3; i++) {
More information about the hibernate-commits
mailing list