You are browsing a version that is no longer maintained.
Upserting documents in the MongoDB ODM is easy. All you really have to do
is specify an ID ahead of time and Doctrine will perform an
upsert flag internally instead of a
The above would result in an operation like the following:
The extra benefit is the fact that you don't have to fetch the
$article in order
to append some new data to the document or change something. All you need is the