On Friday, July 24, 2015 at 1:20:15 PM UTC-4, Richard Kuesters wrote:
>
>  well, as a general non-specific view yes, it can be another approach. 
> but, for the piece of code that drove me to this question, i really need to 
> use after_flush  :)
>


Well I mean... you could use that pattern to catch and annotate the object 
with "I've changed!" info, then do your cleanup in the after_flush.

What popped into my mind as another use-case is this: "touching" an 
object's property to mark it "dirty" (even if SqlAlchemy doesn't interpret 
it as such, because the value is the same), then if it's not updated in the 
flush event, send the update anyways -- so a db-side stored procedure runs.

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