On May 23, 2009, at 10:15 AM, Alessandro Dentella wrote:

>
> Hi,
>
>  when from my pygtk application i commit, I really do::
>
>            if self.session.autocommit:
>                self.session.begin()
>
>            self.session.commit()
>
>  I'm normally using session.autocommit = True as a mean to prevent all
>  those 'idle in transaction' processes (that prevent me from  
> changing the
>  structure of the database - I use PostgreSQL).
> moreover I use
>  autoflush=False to prevent flushing objects when I just need to ge  
> more
>  info from the database via normal 'select'.
>
>  Everything seems to work nicely apart the fact that using this  
> along with
>  after_commit hook in SessionExtension, turns out in a double call  
> of the
>  hook. The first when I run session.begin() and the second when I run
>  session.commit().

I can't see how that occurs.  Can you please post a stack trace ? 
   

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to