[sqlalchemy] Re: deletes using association_proxy

2009-06-03 Thread Michael Bayer
hollister wrote: # mappers mapper(Keyphrase, keyphrase_table) mapper(Action, action_table) mapper(KeyphraseAction, keyphrase_action_table, properties={ 'keyphrase': relation(Keyphrase, backref = 'keyphrase_action'), 'action': relation(Action), }) #

[sqlalchemy] Re: deletes using association_proxy

2009-06-03 Thread Hollister
Mike, thanks for the quick reply. I suspected it was a cascade issue, and have been through the docs and tried various configs. At the risk of appearing stupid, can you point me in the right direction? Do the cascades only need to be on the association table, or also on the left right parent

[sqlalchemy] Re: deletes using association_proxy

2009-06-03 Thread Michael Bayer
cascades work from the parent that is being deleted or is having a child removed to the child that is dependent on being attached to its parent. so in this case Keyphrase-KeyphraseAction and Action-KeyPhraseAction both in theory need delete, delete-orphan cascade. In addition you can specify