propelorm/propelorm.github.com

Add info about Collection sugar methods

marcj opened this issue · 0 comments

Since PHP has a memory leak in our Collection classes we've removed the possibility to call our sugar methods (isLast, isOdd, etc) on a collection directly. It's necessary now to call those methods on the iterator instead.

$books = BookQuery::create()->find();
$iterator = $books->getIterator();
foreach ($iterator as $book){
    if ($iterator->isLast()) {
        //...
    }
}

We have anyhow very less information about that feature documented.