cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1566010 - /cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java
Date Sat, 08 Feb 2014 12:55:25 GMT
Author: aadamchik
Date: Sat Feb  8 12:55:24 2014
New Revision: 1566010

URL: http://svn.apache.org/r1566010
Log:
cleaning up another Oracle test

Modified:
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java?rev=1566010&r1=1566009&r2=1566010&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BindDirectiveTest.java
Sat Feb  8 12:55:24 2014
@@ -33,6 +33,7 @@ import org.apache.cayenne.DataRow;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.access.MockOperationObserver;
 import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.oracle.OracleAdapter;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.query.CapsStrategy;
@@ -141,6 +142,10 @@ public class BindDirectiveTest extends S
         artistNames.add("Artist3");
         String sql = "SELECT * FROM ARTIST WHERE ARTIST_NAME in (#bind($ARTISTNAMES))";
         SQLTemplate query = new SQLTemplate(Artist.class, sql);
+        
+        // customize for DB's that require trimming CHAR spaces 
+        query.setTemplate(OracleAdapter.class.getName(), "SELECT * FROM ARTIST WHERE RTRIM(ARTIST_NAME)
in (#bind($ARTISTNAMES))");
+        
         query.setColumnNamesCapitalization(CapsStrategy.UPPER);
         query.setParameters(Collections.singletonMap("ARTISTNAMES", artistNames));
         List<DataRow> result = context.performQuery(query);



Mime
View raw message