-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 4.0.0 final
-
Component/s: None
-
None
I have a has_and_belongs_to_many relations, let's call it :somethings.
There is a document in which :something_ids includes some ids that no longer exist in the related model (i.e. model.somethings.count is less than model.something_ids.count).
If I try to eager load it with Model.includes(:somethings), then it fails with undefined method `id' for nil:NilClass here
Might be fixed with a simple nil check on doc.