do you know how can I accomplish this? Regards, Roberto Zapata
On Jul 30, 2:03 pm, robertz23 <[EMAIL PROTECTED]> wrote: > Yes, I'm making the flush() when I need to save the data. The problem > is when I try to see it, I mean, make like a select, > creating the object and accessing its fields. > > Sometimes, my webservice gives me the value that I had before and > sometimes, when I refresh the page several times > it changes the value, between the old and new value, that I just saved > in the DB through SqlAlchemy(using flush()). > > I think that I need a way to "delete" from memory this value or the > object, so the next time I call this url, it gives > me the value that is on the DB. > > Regards, > Roberto > > On Jul 30, 1:37 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > 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....) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---