Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0.0BETA1
-
Component/s: Mapping Drivers
-
Labels:None
Description
Getting following errors when using @AlsoLoad annotation on method:
Notice: Undefined index: isCascadePersist in library\Doctrine\ODM\MongoDB\UnitOfWork.php on line 1661 Notice: Undefined index: fieldName in library\Doctrine\ODM\MongoDB\UnitOfWork.php on line 362 Notice: Undefined index: in library\Doctrine\ODM\MongoDB\Mapping\ClassMetadata.php on line 923 Fatal error: Call to a member function getValue() on a non-object in library\Doctrine\ODM\MongoDB\Mapping\ClassMetadata.php on line 923
Test Case:
/** @Document(db="tests", collection="tests") */ class a { /** @Id */ protected $id; /** @String */ protected $b = 'tmp'; /** @AlsoLoad("c") */ function renameC($c) {$this->b = $c;} function getId() {return $this->id;} } $a = new a(); $dm->persist($a); $dm->flush(); $dm->getUnitOfWork()->clear(); $a = $dm->loadByID('a', $a->getId());
Thanks for all the issues
Fixed here http://github.com/doctrine/mongodb-odm/commit/6e7610ac99dcc4cab92cd01bd66e0a2c9ffda1ce