On Tue, Jan 27, 2009 at 4:39 AM, b3d70 <[email protected]> wrote: > def save(self, currency_id, currency_name, currency_symbol, > currency_status): > currency = DBSession.query(Currencies).filter_by(currency_id = > currency_id).one() > currency.name = currency_name > currency.symbol = currency_symbol > currency.status = currency_status
Did you read the SA docs on how to actually do this? you are querying the database instead of saving to it. if this is an update you need to a- get the object b- change it's fields c- save to the db. in tg2 this will be import transaction transaction.commit() in case you were wondering, the transaction module will delegate to call the dbsession.commit, but it allows you to do other "commit like operations" like for example adding a file or other non-db related transaction stuff. in tg1 this will be DBSession.commit() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

