-
Notifications
You must be signed in to change notification settings - Fork 16
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
Bumping to mongoid 5 #4
base: master
Are you sure you want to change the base?
Conversation
Will have a look on testing it with older Mongoid. |
…detect what it should record on the database. So we need to stick with just adding changed_with_relations in order to not break anything else.
Okay... I found a bug with Mongoid 5. When you save an attribute of a nested model, it will push both the nested model and the change on the "changed?" list. For efficiency reasons (I suppose), Mongoid uses this to only save what has been changed on the document so far, resulting in it trying to update the model AND the model's attribute on the same requests. Which Mongo does not like, throwing an error.
The only thing I can think of is drop the aliasing of That might be a deal breaker for this pull request being accepted... What are your thoughts on it? |
Also, I found a bug that is probably happening on the master branch as well. When you save a document that has a I'm trying to figure out why/fix it, but I'm having a hard time. |
@matheus208 hey, do you like to continue this PR? You removed |
Pull request to add compatibility to Mongoid 5.
Changes:
All tests are passing (once again, using Mongoid 5. I haven't used older versions). Is there an easy way to test all Mongoid versions?