cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r552275 - /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java
Date Sun, 01 Jul 2007 10:45:36 GMT
Author: aadamchik
Date: Sun Jul  1 03:45:35 2007
New Revision: 552275

URL: http://svn.apache.org/viewvc?view=rev&rev=552275
Log:
frontbase testing
(frontbase treats "C" as a reserved word) 

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java?view=diff&rev=552275&r1=552274&r2=552275
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextDecoratedStackTest.java
Sun Jul  1 03:45:35 2007
@@ -23,6 +23,7 @@
 import org.apache.art.Artist;
 import org.apache.cayenne.DataChannel;
 import org.apache.cayenne.DataObjectUtils;
+import org.apache.cayenne.dba.frontbase.FrontBaseAdapter;
 import org.apache.cayenne.intercept.DataChannelDecorator;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.unit.CayenneCase;
@@ -45,11 +46,14 @@
 
         SQLTemplate query = new SQLTemplate(
                 Artist.class,
-                "select #result('count(1)' 'int' 'c') from ARTIST");
+                "select #result('count(1)' 'int' 'x') from ARTIST");
         query.setFetchingDataRows(true);
+        query.setTemplate(
+                FrontBaseAdapter.class.getName(),
+                "select #result('COUNT(ARTIST_ID)' 'int' 'x') from ARTIST");
         Map count = (Map) DataObjectUtils.objectForQuery(context, query);
         assertNotNull(count);
-        assertEquals(new Integer(1), count.get("c"));
+        assertEquals(new Integer(1), count.get("x"));
     }
 
     public void testGetParentDataDomain() {



Mime
View raw message