Closed APiercey closed 6 years ago
Hello,
Sorry for the late response, didn't get a GH notification. The code will just use the association, so this should work.. It may be that objects are being loaded in the List
object? Maybe specifying inverse_of
in your associations may help if you've not already done so.
Hello @moiristo! Thanks for the response :) unfortunately, this has been put on hold for me so I have no updates. I'll close the issue for now.
Thanks!
Hello, first I'm sorry if this is the wrong place to ask (it's a question but I might be highlighting a limition as well, not sure).
Second, thank you for the great work :). On to my question:
When I am cloning an object that includes associations (and possible nested associations), I'd like to include those objects ahead of time, example:
Let's say I have a
User
and that user has manyLists
. I was expecting that:would clone the lists that are already eager loaded from
User.includes(:lists).find
. It seems that whensave
is called, each object is retrieved again from the database.Am I misunderstanding something about how this deep_cloneable works with eager loading? How can I use eager loading and speed up complex clones?