testdata/crud/v1/write/updateMany-collation.yml
raw| 1 | data: |
| 2 | - {_id: 1, x: 11} |
| 3 | - {_id: 2, x: 'ping'} |
| 4 | - {_id: 3, x: 'pINg'} |
| 5 | minServerVersion: '3.4' |
| 6 | serverless: 'forbid' |
| 7 | |
| 8 | tests: |
| 9 | - |
| 10 | description: "UpdateMany when many documents match with collation" |
| 11 | operation: |
| 12 | name: "updateMany" |
| 13 | arguments: |
| 14 | filter: |
| 15 | x: 'ping' |
| 16 | update: |
| 17 | $set: {x: 'pong'} |
| 18 | collation: { locale: 'en_US', strength: 2 } # https://www.mongodb.com/docs/manual/reference/collation/#collation-document |
| 19 | |
| 20 | outcome: |
| 21 | result: |
| 22 | matchedCount: 2 |
| 23 | modifiedCount: 2 |
| 24 | upsertedCount: 0 |
| 25 | collection: |
| 26 | data: |
| 27 | - {_id: 1, x: 11} |
| 28 | - {_id: 2, x: 'pong'} |
| 29 | - {_id: 3, x: 'pong'} |