MongoEngine / MongoEngine/mongoengine
behaviour of Document.save with force_insert=False
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Hi,
I am looking at the docs about Document.save here
https://docs.mongoengine.org/apireference.html#mongoengine.Document.save
It states that if a doc does not exists it will be created. However, given that force_insert is by default False, I would claim that the default behaviour is only to create a doc.
Moreover, what does this method throw/return?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Document.save API reference at docs.mongoengine.org/apireference.html#mongoengine.Document.save and inspect the documented force_insert behavior. Verify what the method returns and raises, then update the reference so creation and update behavior and the outcome of the call are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100