Adding cascade="all, delete, delete-orphan" to the relationship should do it.

http://www.sqlalchemy.org/docs/orm/session.html#deleting-from-collections

2011/10/20 Juan Antonio Ibáñez <[email protected]>:
> Hello!
>
>   What is the best way to delete user-group relation when an user is
> deleted? It seems that ondelete cascade definition is not working.
>
> Regards
>
> --
> You received this message because you are subscribed to the Google Groups 
> "TurboGears" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/turbogears?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to