On Apr 11, 2007, at 7:27 AM, Arun Kumar PG wrote:

> Hi Guys,
>
> not tried but quick answer would help me:
>
> session.expunge()'ing an object would also expunge the child  
> attributes which are relations ? e.g. expunging User object would  
> also expunge user_addresses (a list of UserAddress object) ?
>

"expunge" is part of the "all" cascade on a relationship, so if you  
have a cascade of "all" set up then an expunge operation will also  
follow along that relationship.


> Also, if I make any modification in the detached instance both to  
> User and the User Address child attributes within the object and  
> then try to attach and flush will propagate the changes to both the  
> parent and child table -- right ?
>

if you have "save-update" cascade turned on, which is the default  
setting and is also part of the "all" cascade.


--~--~---------~--~----~------------~-------~--~----~
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