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
Updating a DynamicField of a list does not update using .save() or .cascade_save() when the list is updated using .append().
DynamicField
.save()
.cascade_save()
.append()
Ubuntu 20.04 LTS MongoDB v6.0.4 mongoengine v0.26.0 pymongo v3.12.3
class ExampleModel(DynamicDocument): value = DynamicField()
>>> example = ExampleModel(value=[]) >>> example.value.append(1) >>> example.save() <ExampleModel: ExampleModel object> >>> example.value [1] >>> example.reload() <ExampleModel: ExampleModel object> >>> example.value []
>>> example = ExampleModel(value=[]) >>> example.value.append(1) >>> example.save() <ExampleModel: ExampleModel object> >>> example.value [1] >>> example.reload() <ExampleModel: ExampleModel object> >>> example.value [1]
>>> example = ExampleModel(value=[]) >>> example.value.append(1) >>> example.save() <ExampleModel: ExampleModel object> >>> a = list(example.value) >>> a.append(1) >>> example.value = a >>> example.save() >>> example.value [1] >>> example.reload() <ExampleModel: ExampleModel object> >>> example.value [1]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Updating a
DynamicField
of a list does not update using.save()
or.cascade_save()
when the list is updated using.append()
.System Info
Ubuntu 20.04 LTS
MongoDB v6.0.4
mongoengine v0.26.0
pymongo v3.12.3
Reproducible Example
Actual Result
Expected Result
Work-Around
The text was updated successfully, but these errors were encountered: