Hi, I have two models: Parent and Child.
Whenever Parent is deleted, children will be cleaned up with help of cascade rules. However, I would also like to delete parent if there are no children left. Right now, I'm thinking about ON DELETE trigger on Child table, running query to calculate number of children left and issuing DELETE query over Parent. Is there better way to do it? Maybe without database-specific triggers? Thanks, Serge. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.