db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryce Nesbitt <bry...@obviously.com>
Subject Re: Torque not passing setLimit() on to mysql?
Date Fri, 14 Jul 2006 16:22:15 GMT
Thomas Vandahl wrote:
> Bryce Nesbitt wrote:
>> 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?
>
> What version of Torque are you using? This feature has been available
> for ages. Could you please post your Torque.properties?
If found the issue:

            criteria.setLimit (listForm.getLimit());    // The debug
statement
            criteria.setOffset(listForm.getOffset());   // messes up the
setLimit() call
            if( logger.isDebugEnabled() ) {
                logger.debug("Criteria: limit=" + criteria.getLimit() +
                            " offset=" + criteria.getOffset() +
                             "\ntoString: " + criteria.toString());
            }
            criteria.setLimit (listForm.getLimit());    // The debug
statement
            criteria.setOffset(listForm.getOffset());   // messes up the
setLimit() call
            List results = CcsReservationPeer.doSelect(criteria);

The logger.debug() statement somehow messes up the setLimit, as if
reading criteria.toString() clears the limit.  This is with
torque-3.0-b4 (on a legacy application).  Yes, you read correctly, beta 4.

-- 
----
Visit <a href="http://www.obviously.com/">obviously</a>


---------------------------------------------------------------------
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