[sqlalchemy] Re: Column('last_updated', onupdate=func.current_timestamp())

2009-01-14 Thread Michael Bayer
that should be fine, what does your log output say ? On Jan 14, 2009, at 12:38 AM, atomburner wrote: Mr. Bayer, you know entirely too much about all kinds of databases. A follow-up question to your erudite comment (and let me first say that I love sqlalchemy and have spent a good amount of

[sqlalchemy] Newbie Question - Identity Mapper Issue

2009-01-14 Thread koranthala
Hi, Does SqlAlchemy query call __init__ on the mapped object? i.e. Say I have mapped the object to table as follows: mapper(Obj, Table) Now, table contains: index integer x integer y integer And Obj is defined as Class Obj: def __init__(self, x, y):

[sqlalchemy] Re: Newbie Question - Identity Mapper Issue

2009-01-14 Thread az
no, see http://www.sqlalchemy.org/docs/05/mappers.html#constructors-and-object-initialization On Wednesday 14 January 2009 16:33:49 koranthala wrote: Hi, Does SqlAlchemy query call __init__ on the mapped object? i.e. Say I have mapped the object to table as follows: mapper(Obj,

[sqlalchemy] Error: attribute refresh operation cannot proceed

2009-01-14 Thread koranthala
Hi, I moved my application from 0.4 to 0.5 and now I am finding that it is not working - the error is - sqlalchemy.exc.UnboundExecutionError: Instance Data at 0x1357110 is not bound to a Session; attribute refresh operation cannot proceed I read through other mail chains and it looks like

[sqlalchemy] Re: Error: attribute refresh operation cannot proceed

2009-01-14 Thread Michael Bayer
On Jan 14, 2009, at 12:58 PM, koranthala wrote: Hi, I moved my application from 0.4 to 0.5 and now I am finding that it is not working - the error is - sqlalchemy.exc.UnboundExecutionError: Instance Data at 0x1357110 is not bound to a Session; attribute refresh operation cannot proceed

[sqlalchemy] Re: Error: attribute refresh operation cannot proceed

2009-01-14 Thread koranthala
On Jan 14, 11:05 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 14, 2009, at 12:58 PM, koranthala wrote: Hi,   I moved my application from 0.4 to 0.5 and now I am finding that it is not working -  the error is - sqlalchemy.exc.UnboundExecutionError: Instance Data at

[sqlalchemy] Re: Error: attribute refresh operation cannot proceed

2009-01-14 Thread Michael Bayer
On Jan 14, 2009, at 3:01 PM, koranthala wrote: I understood your point and tried updating my code as mentioned. My code is a medium complex one - ~2K lines A problem that I see is that since I take the object and use it at many (~20) places, every single place I have to have a code like -

[sqlalchemy] Re: Column('last_updated', onupdate=func.current_timestamp())

2009-01-14 Thread atomburner
Thank you for such a prompt response. Per the excellent documentation I added the following four lines to my .py script: import logging logging.basicConfig() logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) logging.getLogger('sqlalchemy.orm.unitofwork').setLevel