On Apr 29, 2008, at 5:55 PM, David Bonner wrote:

>
> Hi, I'm trying to write a mapper extension that notifies a daemon
> about changes made to the DB that it needs to care about.  But it
> looks like after_update() is actually getting called before the UPDATE
> is sent to the db.
>
> Not knowing a better way to debug it, I just threw a pdb.set_trace()
> into my after_update method to pause the process making the change,
> then queried the db directly using sql.  It looks like the change
> hasn't made it to the DB yet, even though pdb.set_trace() is being
> triggered.
>

after_update() is called after all UPDATE statements have been issued  
for that particular mapper.  This includes *only* the table that is  
mapped by that mapper, not any other mappers.

Is it possible that you are seeing an UPDATE being issued for an item  
that is related to your parent via a many-to-one ?   Or that you have  
multiple ME's with after_update() at play and perhaps you're seeing a  
different one fire off.



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