#1398: Automatic call of free()
-----------------------------------+----------------------------------------
Reporter: colnector | Owner: romanb
Type: enhancement | Status: new
Priority: minor | Milestone: Unknown
Component: Query/Hydration | Version: 0.11
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
Since free() at the end of a query may be a useful standard thing to do,
the following syntax is inconvinient:
{{{
$q = Doctrine_Query::create();
$existing = $q
->from('Class c')
->execute(array(), Doctrine::HYDRATE_ARRAY);
$q->free(true);
}}}
Instead
{{{
$existing = Doctrine_Query::create()
->from('Class c')
->execute(array(), Doctrine::HYDRATE_ARRAY_AND_FREE);
}}}
or
{{{
$existing = Doctrine_Query::create()
->from('Class c')
->execute(array(), Doctrine::HYDRATE_ARRAY)
->free(true);
}}}
or even a global Doctrine variable
{{{
Doctrine::AUTO_FREE_ON_ARRAY = true;
}}}
Would be a much better choice
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1398>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---