Consider nested relations in the context of Band, Album, and Song models.
beatles = Band(name="The Beatles", albums=[
Album(name="Please Please Me", songs=[
Song(name="I Saw Her Standing There"),
Song(name="Love Me Do"),
]),
])
beatles.save()
beatles_clone = Band("The Beatles 2020 comeback")
beatles.copy_all_child_relations(beatles_clone, commit=True)
Cloning the beatles object will not clone the songs attached to the album.
Consider nested relations in the context of
Band,Album, andSongmodels.Cloning the beatles object will not clone the songs attached to the album.