cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r609344 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
Date Sun, 06 Jan 2008 16:50:10 GMT
Author: aadamchik
Date: Sun Jan  6 08:50:09 2008
New Revision: 609344

URL: http://svn.apache.org/viewvc?rev=609344&view=rev
Log:
CAY-956 Converter between Expression and EJBQL Expression
(fixing quote char)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java?rev=609344&r1=609343&r2=609344&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
Sun Jan  6 08:50:09 2008
@@ -44,8 +44,10 @@
 
     public void testToEJBQL1() {
 
-        Expression e = Expression.fromString("artistName = 'bla'");
-        assertEquals("x.artistName = \"bla\"", e.toEJBQL("x"));
+        Expression e = Expression.fromString("artistName = \"bla\"");
+
+        // note single quotes - EJBQL does not support doublequotes...
+        assertEquals("x.artistName = 'bla'", e.toEJBQL("x"));
     }
 
     public void testEncodeAsEJBQL1() {
@@ -59,7 +61,7 @@
         buffer.flush();
         String ejbql = buffer.toString();
 
-        assertEquals("x.artistName = \"bla\"", ejbql);
+        assertEquals("x.artistName = 'bla'", ejbql);
     }
 
     public void testEncodeAsEJBQL2() {



Mime
View raw message