7 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: Session Problem
FromSent OnAttachments
robertz2330 Jul 2007 09:34 
Michael Bayer30 Jul 2007 10:37 
robertz2330 Jul 2007 11:03 
robertz2330 Jul 2007 12:35 
Michael Bayer30 Jul 2007 13:20 
Paul Johnston30 Jul 2007 16:27 
robertz2331 Jul 2007 05:23 
Subject:[sqlalchemy] Re: Session Problem
From:Michael Bayer (mike@zzzcomputing.com)
Date:07/30/2007 10:37:29 AM
List:com.googlegroups.sqlalchemy

On Jul 30, 2007, at 12:34 PM, robertz23 wrote:

Hi, I'm making a project using TurboGears with SqlAlchemy. The problem that I think I have is when I make some changes to the DB with the webservice I'm making or directly using MySQL shell. What happens next is that sometimes when I refresh the page it shows me the value I had before (Although the DB has the new value). I've tried to use close() or clear() methods, but I think sometimes they work sometimes they don't. I'm using assign_mapper with a session_context for all my models. This is some of the code:

did you forget to flush() ? this is required in the current 0.3 release of SQLAlchemy in order to write the changes to the database.

(looks like the autoflush idea in 0.4 will be a big winner....)