beberlei/DoctrineExtensions — Issue #72: Paginate with limit = 0 throw an exception
Author: armetiz
Created: 2012-02-27 14:30:06+00:00
State: open

After update and use this commit : https://github.com/beberlei/DoctrineExtensions/commit/4ea498a6ca75de67e716355d3b3534ef363c4812

My application generate an Exception : "No ids given, cannot create where in query in this case.".
Here my code : https://gist.github.com/1924172

The problem is, "$this->getOptions()->getLimit()" have default value set to 0.

Everything work fine with a "limit" value different of "0".
I think that Paginate::getPadinateQuery could take 0 for the limit argument.

Here a simple example :
I want to display all item with an offset of 10. Right now, it's not possible because a limit of 0 will generate an exception.

Do you see what I mean ?