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

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 ?

    Thomas

/**
 * 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to