We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class Sample(Document): num: int name: str version: int = 0
@before_event(Update) def increase_version(self): self.version += 1
doc = await Sample.find_one() await doc.inc({Sample.num: 1})
i looked in database num increase so its clearly updated but the versioning is never changing
The text was updated successfully, but these errors were encountered:
its because in update it only update with args from the query itself but the action event doesnt it it
Sorry, something went wrong.
Hi @CAPITAINMARVEL , Unfortunately it would be tricky and not explicit enough to add an addition set step to the update query for this case
This issue is stale because it has been open 30 days with no activity.
This issue was closed because it has been stalled for 14 days with no activity.
No branches or pull requests
class Sample(Document):
num: int
name: str
version: int = 0
doc = await Sample.find_one()
await doc.inc({Sample.num: 1})
i looked in database num increase so its clearly updated
but the versioning is never changing
The text was updated successfully, but these errors were encountered: