db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Torque ignoring setLimit(0)?
Date Sat, 28 Jan 2006 14:03:18 GMT
Trying to clean some old messages from my mailbox...

The behavior described below is defined in LimitHelper.buildLimit() for 
databases with native limit support. For databases without limit support, 
Village throws an Exception. I am not totally sure, but the behaviour 
might have changed between 3.1.1 and 3.2, as then the whole limit code was 

I would guess it is ok to change this, but I am not totally sure. The only 
people affected will be those who explicitly set the limit to 0 and then 
get all data. Any objections if I change the behavior for databases with 
native limit support ?


  * To limit the number of rows to return.  <code>-1</code> means return all
  * rows.
private int limit = -1;

On Mon, 19 Sep 2005, Dennis Vredeveld wrote:

> Hello!
> during unit testing my software that uses Torque, I discovered that
> crit.setLimit(0) does not yield an empty result, as one would expect.
> Instead, Torque seems to ignore the set limit at all, as
> BasePeer.createQueryString(crit) shows a query with no LIMIT statement at
> all. As a result, I receive the full result set instead of an empty one.
> Ofcourse, such a limit may not make much sense, but as it is a valid one (at
> least in MySQL), I feel Torque should be able to cope with such a
> situartion...
> Regards,
> Dennis Vredeveld
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

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

View raw message