MongoEngine / MongoEngine/mongoengine

Document.reload always dereferences via select_related

Open
#2,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.3k
Forks
1.2k
Avg merge
4h 41m
Merged PRs (30d)
11

Description

https://github.com/MongoEngine/mongoengine/blob/88c4aa2d87f4479a22aaaef8ec9c697fe94777e1/mongoengine/document.py#L718-L720

Is this a correct behavior, that Document.reload always dereferences via select_related even though automatic dereferencing can be disabled ( http://docs.mongoengine.org/guide/querying.html#turning-off-dereferencing ) ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at mongoengine/document.py lines 718-720 and compare Document.reload with the documented automatic-dereferencing behavior in the linked querying guide. Verify what happens when dereferencing is disabled, then establish and test the expected reload behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.