Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Add support for $setOnInsert operator #235

Merged
merged 2 commits into from
Oct 31, 2015
Merged

Add support for $setOnInsert operator #235

merged 2 commits into from
Oct 31, 2015

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Oct 31, 2015

This PR adds support for the $setOnInsert operator that was added in MongoDB 2.4.

@@ -177,7 +177,6 @@ public function testFindQuery()
public function testUpsertUpdateQuery()
{
$qb = $this->getTestQueryBuilder()
->update()
Copy link
Member

Choose a reason for hiding this comment

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

wasn't this test checking if upsert overrides previous update?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're correct. I've had half a mind of making upserts imply an update but then I changed my mind and forgot to change this back. Fixed now.

malarzm added a commit that referenced this pull request Oct 31, 2015
Add support for $setOnInsert operator
@malarzm malarzm merged commit f21bff9 into doctrine:master Oct 31, 2015
@alcaeus alcaeus deleted the setOnInsert-operator branch October 31, 2015 11:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants