Skip to content

Commit 99f4f45

Browse files
committed
Add docs on bulk_upsert method
1 parent 61e2e3a commit 99f4f45

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/manager.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,15 @@ The `on_conflict`, `insert` and `insert_or_create` methods were only added in `d
238238
)
239239
)
240240

241+
(
242+
MyModel.objects
243+
.bulk_upsert(
244+
conflict_target=['myfield']
245+
rows=[
246+
dict(myfield='beer'),
247+
dict(myfield='wine')
248+
]
249+
)
250+
)
251+
241252
These two short hands still exist and **are not** deprecated. They behave exactly the same as `ConflictAction.UPDATE` and are there for convenience. It is up to you to decide what to use.

0 commit comments

Comments
 (0)