Skip to content

Commit

Permalink
Add strategy attribute to reference and embed mapping in XmlDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar authored and avalanche123 committed Sep 2, 2010
1 parent 13abd01 commit d427a6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php
Expand Up @@ -184,6 +184,7 @@ private function addEmbedMapping(ClassMetadata $class, $embed, $type)
'embedded' => true,
'targetDocument' => isset($attributes['target-document']) ? (string) $attributes['target-document'] : null,
'name' => (string) $attributes['field'],
'strategy' => isset($attributes['strategy']) ? (string) $attributes['strategy'] : 'pushPull',
);
$this->addFieldMapping($class, $mapping);
}
Expand All @@ -201,6 +202,7 @@ private function addReferenceMapping(ClassMetadata $class, $reference, $type)
'reference' => true,
'targetDocument' => isset($attributes['target-document']) ? (string) $attributes['target-document'] : null,
'name' => (string) $attributes['field'],
'strategy' => isset($attributes['strategy']) ? (string) $attributes['strategy'] : 'pushPull',
);
$this->addFieldMapping($class, $mapping);
}
Expand Down

1 comment on commit d427a6a

@ornicar
Copy link
Contributor Author

@ornicar ornicar commented on d427a6a Sep 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, was quick, thanks!

Please sign in to comment.