On May 12, 2008, at 2:08 PM, [EMAIL PROTECTED] wrote:

>
> hi
> i have some pre_save automatic operations and decided MVC-like to
> split them into 2 phases - a per-object validation-only that goes at
> save(), and a per-flush set-up 2nd phase for putting timestamps etc.
> The 2nd one is via SessionExtension.before_flush().
> i'm looking at the session state at that time:
> - what is the list of all instances going to be changed?
> something like
> all = ses.new() + [ i for i in ses.dirty() if ses.modified(i) ]

theres a method that tells you "is this *really* modified" called  
"session.is_modified(x)".

> - would this include all relation-cascaded items or not?

it wont include changes on foreign key columns nor every kind of  
"orphaned" object.

> - as flush hasn't happened yet, i guess dependencies are not
> available - or are they?

some of them, but not all.




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