Hi, Sorry for bumping a month-old thread, I'd just like to know more about this bit.
Does this mean that the database isn't actually queried until you iterate over the ArticleCollection? Is there a code example for this that I could examine? Thanks, -- Mon On Fri, Apr 16, 2010 at 1:41 AM, Hector Virgen <[email protected]> wrote: > > I would pass in the criteria as array('published' => true). The mapper then > maps that to "WHERE isPublished = 1". > > I don't support returning *n* articles in the mapper because my > lazy-loading iterator handles that for me: > > $articles = $mapper->fetchAll(array('published' => true)); > assert($articles instanceof Default_Model_ArticleCollection); // true > assert($articles instanceof SeekableIterator); // true > $articles->seekTo(20); > $article = $articles->current(); > assert($article instanceof Default_Model_Article); // true > > >
