> At first, I thought you were looking for session.new, session.dirty &
> session.deleted
This could be what I need. If session.deleted contains everything that has been 
deleted, then I am getting the same result my performing the query on the 
session instead of the entity.

> This is a FAQ in SQLAlchemy:
> See 
> http://www.sqlalchemy.org/trac/wiki/FAQ#Imcallingdeletemyobjectanditisntremovedfromtheparentcollection
>
> So in your case that means:
>
> session.expire(user, ['addresses'])
>
> There are other options though, see the linked page.
>   
Is that really it? The article mentions using cascading, which I am already 
using. Doesn't that just mean that when I mark something to be deleted, it very 
nicely marks dependencies to be deleted? session.expire sounds like it will 
mark an entity as changed so that when I access it, it will re-read the result 
from the database. My problem is that I've not committed anything, so it will 
read the state prior to my changes.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to