Browse files

minor fixes

  • Loading branch information...
1 parent 9a879f4 commit 1956f003b04bc9330b1d406ccd48e26cda96982a Johannes Stark committed with lsmith77 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
View
3 lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadataInfo.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;
}
View
1 lib/Doctrine/ODM/PHPCR/UnitOfWork.php
@@ -879,6 +879,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 1956f00

Please sign in to comment.