Skip to content

Nested ClusterableModel relations are not copied #153

@vbudovski-alliance

Description

@vbudovski-alliance

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions