-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 8.0.1, 8.1.0
-
Component/s: Performance, Validations
-
None
Hi there, thanks for all your work on Mongoid!
We are currently using Mongoid 7.5.3 and we want to upgrade to Mongoid 8.1.1. Everything seems to be working fine except that the performance when creating document has degraded a bit. I've been trying to find the specific commit that was causing this issue and I found out that this commit introduced the performance issues:
https://github.com/mongodb/mongoid/commit/13044a829141495b39ff4c62adef1ac7299e7e4a
Removing the following change fixes the performance issues
The other way of fixing the issue is by setting belongs_to_required_by_default to false in the mongoid.yml file but it would be great if we can have the validations while having the performance of mongoid 7.5.3.
Thanks in advance for your help and keep up the good work!
- duplicates
-
MONGOID-5704 Mongoid 8.x performance and validation issues with belongs_to associations
- Closed
- is caused by
-
MONGOID-4160 Don't persist document if associated document is invalid with optional: false
- Closed
- is related to
-
MONGOID-5704 Mongoid 8.x performance and validation issues with belongs_to associations
- Closed