On Mar 9, 2014, at 3:18 PM, Dmitry Berman <dmikha...@gmail.com> wrote:

> 
> print "\nQuery to check for changes with products and modules, shows that the 
> modules and product are gone:\n"
> print Product.query.all()
> print Module.query.all()
> 
> print "\nThe modules below belong to the deleted product, they should have 
> disappeared, but do not: <-- NOT SURE WHY THIS IS HAPPENING"
> print Product1Mod1
> print Product1Mod2
> print Product1Mod3


not sure what you're expecting there, are you expecting that the "Product1Mod1" 
symbol would be modified within your interpreter to be None?  Python can't do 
that under normal circumstances.      A variable always points to the thing 
that it was assigned to, there's no (normal, non-hacky) mechanism by which 
variables change into "None" without explicitly being reassigned.

Those product objects represent what used to be in those rows.  They have a 
"deleted" flag you can see:

>>> from sqlalchemy import inspect
>>> inspect(deleted_product).deleted
True

-- 
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/d/optout.

Reply via email to