Re: [sqlalchemy] Weird error with update

2009-11-25 Thread Ilia Kharin
> > one advantage of this syntax is that Python will raise an exception that > last_access does not exist. > yes, and it will be seen at first running -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@

Re: [sqlalchemy] Weird error with update

2009-11-23 Thread Mike Conley
> Why not use update({ESMagicNumber.last_access: datetime.datetime.now()}) ? > > > one advantage of this syntax is that Python will raise an exception that last_access does not exist. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this

Re: [sqlalchemy] Weird error with update

2009-11-22 Thread akscram litus
> > I am able to create the same bad SQL, but only if the key in the update > dictionary is not a column in the table being updated. Are you sure > 'last_access' is a valid column in ESMagicNumber? > Why not use update(ESMagicNumber.last_access: datetime.datetime.now()) ? -- You received this m

Re: [sqlalchemy] Weird error with update

2009-11-21 Thread Mariano Mara
Excerpts from Mike Conley's message of Sat Nov 21 03:36:07 -0300 2009: > On Fri, Nov 20, 2009 at 5:14 PM, Mariano Mara wrote: > > > ... or, at least, is weird for me :) > > Hi everyone. I'm running a pylons controller > > with the following instruction: > > > >meta.Session.query(ESMagicNum

Re: [sqlalchemy] Weird error with update

2009-11-20 Thread Mike Conley
On Fri, Nov 20, 2009 at 5:14 PM, Mariano Mara wrote: > ... or, at least, is weird for me :) > Hi everyone. I'm running a pylons controller > with the following instruction: > >meta.Session.query(ESMagicNumber).filter( >ESMagicNumber.uuid==request.params['uuid_']).\ >

[sqlalchemy] Weird error with update

2009-11-20 Thread Mariano Mara
... or, at least, is weird for me :) Hi everyone. I'm running a pylons controller with the following instruction: meta.Session.query(ESMagicNumber).filter( ESMagicNumber.uuid==request.params['uuid_']).\ update({'last_access':datetime.datetime.now()}) but I'm ge