MongoEngine / MongoEngine/mongoengine
model having sequence field misbehaves when i select specific fields using only
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Friends,
I am facing following issue
- I have a model which contains SequenceField (Ex: MyModel which contains a sequence field say seqid)
- When i do a normal query on that model (Ex: MyModel.objects(name="arul")) it works properly
- if i want to select specific fields, it gives me a new object whose sequence field incremented (Ex: MyModel.objects(name="arul").only("id", "enabled" returns a new object with seqid field increment)
Please let me know if i am missing something
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 by reproducing the reported behavior with MyModel.objects(name="arul") and the .only("id", "enabled") query, comparing the sequence field in each returned object. Trace the model query and SequenceField handling involved in that path; done means selecting specific fields no longer increments or unexpectedly assigns the sequence field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100