propelorm/Propel — Issue #204: PropelCollection->contains($object) returns true in action, false in template (Symfony 1.4)
Author: brightblue
Created: 2011-11-30 01:18:41+00:00
State: open

When attempting to check the existence of a child object within a parent collection using the contains method:
```
// actions.class.php
public function executeMethod (sfWebRequest $request)
{
$this->parent = ParentQuery::create()->findOneById($id);
$this->child = ChildQuery::create()->findOneById($id);

$this->parent->getChildren()->contains($child); // Returns true
}

// methodSuccess.php
getChildren()->contains($child); // Returns false ?>
```

The issue appears to be that assuming `$parent->getChildren()->getFirst() === $child` is true in the action, it is *not* true once you reach the template - one would assume that this should not be the case.