Hi! A couple of questions.

1. I've got a "Product" class and a "Tag" class, related as m2m. If I
delete a product, all rows referencing that product will be removed from
the secondary table - which is good. However, the same will happen if I
delete a tag (all references to the tag will be removed from the secondary
table) - despite the fact that the tag is actually used in many products.
Not good. How can I ensure that a tag can not be removed if it is
referenced by any product?

2. I can do MyClass.iterate_properties()and check if a property is m2m
relationship. But how can I find out which class it references?

Thanks!

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to