I have a 3 level hierarchical data structure, for this example lets
say it’s Bike (has many) Wheels (has many) Spokes.
Here’s what I want to do, update a bunch of Spokes that all belong to
one Bike but do it all with one Save! method call.
I’ve tried loading the Bike, accessing, changing, and adding Spokes
through the Bike.wheels.spokes collections then doing Bike.save! but
it doesn’t work (the database remains unchanged). It DOES work
however when I create a new bike record, add the wheels and spokes
then save that.
So is there any way to have all the Spoke records saved with one call
to save? I’m attempting to limit the number of individual SQL calls,
cause there are a lot of spoke records and it will happen often.
Thanks in advance,