From: Alexey L. <lou...@us...> - 2004-07-29 07:33:06
|
User: loubyansky Date: 04/07/29 00:32:57 Modified: src/main/org/jboss/test/cmp2/commerce Tag: Branch_3_2 QueryTest.java Log: added a test for ORDER BY fields that are not in SELECT Revision Changes Path No revision No revision 1.2.2.16 +5 -0 jbosstest/src/main/org/jboss/test/cmp2/commerce/QueryTest.java Index: QueryTest.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/cmp2/commerce/QueryTest.java,v retrieving revision 1.2.2.15 retrieving revision 1.2.2.16 diff -u -r1.2.2.15 -r1.2.2.16 --- QueryTest.java 7 Jul 2004 12:01:36 -0000 1.2.2.15 +++ QueryTest.java 29 Jul 2004 07:32:56 -0000 1.2.2.16 @@ -190,6 +190,11 @@ compileJBossQL("SELECT DISTINCT UCASE(u.userName) FROM user u ORDER BY u.userName", Collection.class, new Class[]{String.class}) ); + assertEquals( + "SELECT DISTINCT t0_u.USER_NAME, t0_u.USER_ID FROM USER_DATA t0_u ORDER BY t0_u.USER_ID ASC", + compileJBossQL("SELECT DISTINCT u.userName FROM user u ORDER BY u.userId", + Collection.class, new Class[]{String.class}) + ); assertEquals( "SELECT t0_o.ORDER_NUMBER FROM ORDER_DATA t0_o, ADDRESSEJB t1_o_shippingAddress WHERE (t1_o_shippingAddress.city = ? AND t0_o.SHIPPING_ADDRESS=t1_o_shippingAddress.id) OR (t1_o_shippingAddress.state = ? AND t0_o.SHIPPING_ADDRESS=t1_o_shippingAddress.id)", |