[jboss-cvs] JBossAS SVN: r67377 - trunk/testsuite/src/main/org/jboss/test/cmp2/commerce.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 22 06:51:44 EST 2007


Author: alex.loubyansky at jboss.com
Date: 2007-11-22 06:51:43 -0500 (Thu, 22 Nov 2007)
New Revision: 67377

Modified:
   trunk/testsuite/src/main/org/jboss/test/cmp2/commerce/QueryTest.java
Log:
JBAS-3423

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/commerce/QueryTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/commerce/QueryTest.java	2007-11-22 11:50:33 UTC (rev 67376)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/commerce/QueryTest.java	2007-11-22 11:51:43 UTC (rev 67377)
@@ -46,7 +46,6 @@
 public class QueryTest extends EJBTestCase
 {
    private JDBCEJBQLCompiler compiler;
-   private static final String javaVersion = System.getProperty("java.specification.version");
    private static final Class[] NO_PARAMS = new Class[]{};
 
    public static Test suite() throws Exception
@@ -166,9 +165,7 @@
                    compileJBossQL("SELECT OBJECT(u) FROM user u WHERE LCASE(u.userName) = ?1",
                                   Collection.class, new Class[]{String.class}));
 
-      String expected = "1.4".equals(javaVersion) ?
-            "SELECT t0_o1.ORDER_NUMBER FROM ORDER_DATA t0_o1, ORDER_DATA t3_o2, CUSTOMEREJB t2_o2_customer, CUSTOMEREJB t1_o1_customer WHERE (( NOT (t1_o1_customer.id=t2_o2_customer.id)) AND (t0_o1.CC_TYPE=t3_o2.CC_TYPE AND t0_o1.CC_FIRST_NAME=t3_o2.CC_FIRST_NAME AND t0_o1.CC_MI=t3_o2.CC_MI AND t0_o1.CC_LAST_NAME=t3_o2.CC_LAST_NAME AND t0_o1.CC_BILLING_ZIP=t3_o2.CC_BILLING_ZIP AND t0_o1.CC_CARD_NUMBER=t3_o2.CC_CARD_NUMBER) AND t3_o2.customer=t2_o2_customer.id AND t0_o1.customer=t1_o1_customer.id)" :
-            "SELECT t0_o1.ORDER_NUMBER FROM ORDER_DATA t0_o1, ORDER_DATA t3_o2, CUSTOMEREJB t1_o1_customer, CUSTOMEREJB t2_o2_customer WHERE (( NOT (t1_o1_customer.id=t2_o2_customer.id)) AND (t0_o1.CC_TYPE=t3_o2.CC_TYPE AND t0_o1.CC_FIRST_NAME=t3_o2.CC_FIRST_NAME AND t0_o1.CC_MI=t3_o2.CC_MI AND t0_o1.CC_LAST_NAME=t3_o2.CC_LAST_NAME AND t0_o1.CC_BILLING_ZIP=t3_o2.CC_BILLING_ZIP AND t0_o1.CC_CARD_NUMBER=t3_o2.CC_CARD_NUMBER) AND t0_o1.customer=t1_o1_customer.id AND t3_o2.customer=t2_o2_customer.id)";
+      String expected = "SELECT t0_o1.ORDER_NUMBER FROM ORDER_DATA t0_o1, ORDER_DATA t3_o2, CUSTOMEREJB t2_o2_customer, CUSTOMEREJB t1_o1_customer WHERE (( NOT (t1_o1_customer.id=t2_o2_customer.id)) AND (t0_o1.CC_TYPE=t3_o2.CC_TYPE AND t0_o1.CC_FIRST_NAME=t3_o2.CC_FIRST_NAME AND t0_o1.CC_MI=t3_o2.CC_MI AND t0_o1.CC_LAST_NAME=t3_o2.CC_LAST_NAME AND t0_o1.CC_BILLING_ZIP=t3_o2.CC_BILLING_ZIP AND t0_o1.CC_CARD_NUMBER=t3_o2.CC_CARD_NUMBER) AND t3_o2.customer=t2_o2_customer.id AND t0_o1.customer=t1_o1_customer.id)";
       String compiled = compileJBossQL(
          "SELECT OBJECT(o1) FROM OrderX o1, OrderX o2 WHERE o1.customer <> o2.customer AND o1.creditCard = o2.creditCard",
          Collection.class, NO_PARAMS);
@@ -305,22 +302,14 @@
          )
       );
 
-      String expected = "1.4".equals(javaVersion) ?
+      String expected =
          "SELECT t0_o.ORDER_NUMBER " +
          "FROM ORDER_DATA t0_o, LINEITEMEJB t4_l, PRODUCTCATEGORYEJB t1_pc, PRODUCT_PRODUCT_CATEGORY t5_l_product_productCategories_R, PRODUCT t6_l_product " +
          "WHERE (((t0_o.ORDER_NUMBER = ? AND t1_pc.name = ?))) " +
          "AND t6_l_product.id=t5_l_product_productCategories_R.PRODUCT_ID " +
          "AND t1_pc.id=t5_l_product_productCategories_R.PRODUCT_CATEGORY_ID " +
          "AND t1_pc.subId=t5_l_product_productCategories_R.PRODUCT_CATEGORY_SUBID " +
-         "AND t4_l.product=t6_l_product.id AND t0_o.ORDER_NUMBER=t4_l.ORDER_NUMBER" :
-         "SELECT t0_o.ORDER_NUMBER " +
-         "FROM ORDER_DATA t0_o, LINEITEMEJB t4_l, PRODUCTCATEGORYEJB t1_pc, PRODUCT_PRODUCT_CATEGORY t5_l_product_productCategories_R, PRODUCT t6_l_product " +
-         "WHERE (((t0_o.ORDER_NUMBER = ? AND t1_pc.name = ?))) " +
-         "AND t0_o.ORDER_NUMBER=t4_l.ORDER_NUMBER " +
-         "AND t6_l_product.id=t5_l_product_productCategories_R.PRODUCT_ID " +
-         "AND t1_pc.id=t5_l_product_productCategories_R.PRODUCT_CATEGORY_ID " +
-         "AND t1_pc.subId=t5_l_product_productCategories_R.PRODUCT_CATEGORY_SUBID " +
-         "AND t4_l.product=t6_l_product.id";
+         "AND t4_l.product=t6_l_product.id AND t0_o.ORDER_NUMBER=t4_l.ORDER_NUMBER";
 
       String compiled = compileEJBQL("SELECT OBJECT(o) FROM OrderX o, " +
                                       "IN(o.lineItems) l, " +




More information about the jboss-cvs-commits mailing list