/** * Make sure to only use the mongoDB ODM strategies for onMany * * @param object $object * @param mixed $collectionName * @param string $target * @param mixed $values */ protected function toMany($object, $collectionName, $target, $values) { if ($this->hasStrategy($collectionName)) { $strategy = $this->getStrategy($collectionName); if ($strategy instanceof AbstractMongoStrategy) { $strategy->setObject($object); $this->hydrateValue($collectionName, $values, $values); return; } } parent::toMany($object, $collectionName, $target, $values); }