Permalink
Browse files

Merge pull request #62 from starkj/referrers

minor fixes
  • Loading branch information...
2 parents 45a7cf6 + 68e3691 commit bf0cee5a5ca9d018371152788deeeca5ca92df55 @dbu dbu committed Sep 5, 2011
Showing with 4 additions and 0 deletions.
  1. +3 −0 lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadataInfo.php
  2. +1 −0 lib/Doctrine/ODM/PHPCR/UnitOfWork.php
@@ -579,6 +579,9 @@ protected function validateAndCompleteAssociationMapping($mapping)
if (isset($mapping['targetDocument']) && strpos($mapping['targetDocument'], '\\') === false && strlen($this->namespace)) {
$mapping['targetDocument'] = $this->namespace . '\\' . $mapping['targetDocument'];
}
+ if (!is_bool($mapping['weak'])) {
+ throw new MappingException("The attribute 'weak' for the '" . $this->name . "' association has to be a boolean true or false.");
+ }
return $mapping;
}
@@ -877,6 +877,7 @@ public function flush($persist_to_backend = true)
if ($class->associationsMappings[$fieldName]['type'] === $class::MANY_TO_MANY) {
if (isset($fieldValue)) {
+ $refNodesIds = array();
foreach ($fieldValue as $fv ) {
if ($fv === null) {
continue;

0 comments on commit bf0cee5

Please sign in to comment.