1
votes

I've been using symfony 2 for quite sometime already and Doctrine 2 has a way to mass select via unbuffered query ie

$query->iterate();

Now I have to work on some legacy software that's using Symfony 1.4 w/ Doctrine 1.2 and it would be quite useful to have something like that, but unfortunately I can't seem to find it anywhere in the documentation.

Any suggestions?

Thanks!

1
Symfony 1.4 is not legacy, it still has LTS until January 2013 ;-)Flukey
haha yeah sorry wrong use of the word.Jan Michael Tan
On the page documenting iterate() there's this sentence "Results may be fully buffered by the database client/ connection allocating additional memory not visible to the PHP process.", which means that sometimes this query may NOT be unbuffered. Did you by any chance have any insight as to when it may happend? Any warnings or gotchas? doctrine-orm.readthedocs.org/en/latest/reference/…Dimitry K

1 Answers

0
votes

I'm not sure if it's an exact replacement, but Doctrine_Core::HYDRATE_ON_DEMAND hydration may be what you're looking for.

See official Doctrine documentation for more info: http://readthedocs.org/docs/doctrine/en/latest/en/manual/data-hydrators.html?highlight=hydration#on-demand