-
Adrianna Chang authored
This commit adds a test that demonstrates a regression in has_many_through associations where multiple has_many_through associations associate the same parent with the same child relation. The regression is ultimately caused by rails@0d38f2a, which avoids saving a through association target if we expect the target to be persisted by another (direct) association. The problem is that if we have multiple has_many_through associations that associate the same parent with the same child, we will autosave the first set of associations from the parent, but avoid saving the through target a second time (once it's persisted by the first association), and fail to create the join model for the second association chain.
Adrianna Chang authoredThis commit adds a test that demonstrates a regression in has_many_through associations where multiple has_many_through associations associate the same parent with the same child relation. The regression is ultimately caused by rails@0d38f2a, which avoids saving a through association target if we expect the target to be persisted by another (direct) association. The problem is that if we have multiple has_many_through associations that associate the same parent with the same child, we will autosave the first set of associations from the parent, but avoid saving the through target a second time (once it's persisted by the first association), and fail to create the join model for the second association chain.
Loading