RunRunners:
    columns:
        run_id:         { type: integer, primary: true }
        runner_id:      { type: integer, primary: true }
    relations:
        Run:
            local:          run_id
            foreign:        id
            foreignAlias:   RunRunners
            onDelete:       CASCADE
        Runner:
            local:          runner_id
            foreign:        id
            foreignAlias:   RunRunners
            onDelete:       CASCADE

Thanks to http://symfony-world.blogspot.com/2010/02/many-to-many-relations-with-on-delete.html

Advertisement