Skip to content
juokaz edited this page Sep 13, 2010 · 2 revisions

Although I’m new to Doctrine and this is subjective, I changed the execute call to:
→execute(array(), Doctrine::HYDRATE_ARRAY);
and I have the feeling the response is quicker…plus it “hydrates” as array ;)

Comment from Juozas: it’s up to you what hydration you want to use. When you are passing a query, you can do $query→setHydrationMode(hydration) and you get object graph, array or anything else. Definitely you shouldn’t do this in actual paginator code. And yes – hydration to array is way faster, but… it’s up to you to choose it, sometimes you do need objects.

Clone this wiki locally