On Jan 9, 9:24 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> So if I understand what youre looking to do here,  youd like a keyword
> to be deleted when the last parent is removed ?

That is exactly what I would like...

> if youd like to check for this condition after each flush you can do
> it with SessionExtension, using after_flush().   it could be done in a
> single DELETE statement, i.e.
>
> delete from keywords where not exists(select 1 from
> keyword_associations where keyword_id=keywords.id)

...But I would also like to track tag deletion in SessionExtension,
and If I'm using directly a DELETE statement, it won't trigger
anything in SessionExtension.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to