db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryce Nesbitt <bry...@obviously.com>
Subject Torque not passing setLimit() on to mysql?
Date Tue, 11 Jul 2006 09:53:13 GMT
Our application sets a limit:
             ....
            criteria.setLimit (25);
            List results = CcsReservationPeer.doSelect(criteria);
            logger.debug("Searching up to " + criteria.getLimit() +
            " reservations: " + criteria.toString());


The debug shows the limit:

1827924 [tcpConnection-8080-3] DEBUG sql.SQLReservationManager  -
Searching up to 25 reservations:
Criteria::
XXX_RESERVATION.STOP<=>(XXX_RESERVATION.STOP>='20060711023000' AND
XXX_RESERVATION.STOP<='20060711043000'): 
XXX_RESERVATION.CLASS_ID<=>XXX_RESERVATION.CLASS_ID IN
(4,2,6,12,11,5,9,10,8,1,7,3):
Current Query SQL (may not be complete or applicable):
SELECT  FROM XXX_RESERVATION WHERE
(XXX_RESERVATION.STOP>='20060711023000' AND
XXX_RESERVATION.STOP<='20060711043000') AND XXX_RESERVATION.CLASS_ID IN
(4,2,6,12,11,5,9,10,8,1,7,3) ORDER BY XXX_RESERVATION.START DESC LIMIT 25


But it does NOT show up in the mysql query log:
060711  2:35:45       1 Query       SELECT 1
                      1 Query       SET autocommit=1
                      1 Query       SELECT
XXX_RESERVATION.RESERVATION_ID, XXX_RESERVATION.MEMBER_ID,
XXX_RESERVATION.ASSIGNMENT_ID,  XXX_RESERVATION.SURVEY FROM
XXX_RESERVATION WHERE (XXX_RESERVATION.STOP>='20060711023000' AND
XXX_RESERVATION.STOP<='20060711043000') AND XXX_RESERVATION.CLASS_ID IN
(4,2,6,12,11,5,9,10,8,1,7,3) ORDER BY XXX_RESERVATION.START DESC


And, of course, it does not work.  This is an older Torque, with a
modern mysql 4.1.  Any ideas what I may be doing wrong?


-- 
----
Visit http://www.obviously.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message