-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Undefined document fields should not override instance methods #49
Milestone
Comments
+1 |
Any plans on fixing this? |
Yes, its assigned to the 0.8 release - which is in active development. Of course pull requests help things get implemented in a more timely fashion ;) |
Looking into implementing this today. |
rozza
added a commit
that referenced
this issue
Jan 25, 2013
Apologies for taking so long but this is now in the 0.8 branch - any undefined data will be put in |
Thanks! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mongoengine should not set attributes and potentially override instance methods when initializing a model with fields that are not defined in the document structure. For example, the following code should either trigger an error when creating the document, or create the document silently while keeping the instance method and print
hello
as expected:Similarly, when a document of the structure
{ "method": "something" }
exists in the database, loading that document (e.g. usingget()
) should not override the instance method.The text was updated successfully, but these errors were encountered: