Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Stark authored and lsmith77 committed Sep 5, 2011
1 parent 9a879f4 commit 1956f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/ODM/PHPCR/Mapping/ClassMetadataInfo.php
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ODM/PHPCR/UnitOfWork.php
Expand Up @@ -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;
Expand Down

0 comments on commit 1956f00

Please sign in to comment.