Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Fix for LooselyCoupled template - Removed clearAccessor call from fet…
Browse files Browse the repository at this point in the history
…chLooselyCoupledRelation

Doctrine_Record stores customAccessors in a static property, not per instance
Doctrine_Templates are stored in the table, not the record, and so are only instantiated (and so setUp etc methods called) once.

Thus, the custom accessor is removed from all present and future instances of the relevant object class by this call, and will never be re-added.
I assume the intention was to remove from the current instance only?
  • Loading branch information
benlumley committed May 3, 2011
1 parent 1a756c0 commit 0eaf3d6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/Doctrine/Template/LooselyCoupled.php
Expand Up @@ -23,7 +23,6 @@ public function setTableDefinition()
public function fetchLooselyCoupledRelation($load, $field)
{
$record = $this->getInvoker();
$record->clearAccessor($field);

if($record->hasReference($field))
{
Expand Down

0 comments on commit 0eaf3d6

Please sign in to comment.