Re: [sqlalchemy] updates using declarative extention

2011-06-15 Thread Mike Conley
see
http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query.update

We use session.query(..).update(..,synchronize_session=False) for
updates where we are sure about the criteria and session state. This
generates an update statement without any selects.

-- 
Mike Conley

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] updates using declarative extention

2011-06-15 Thread Liju
I'm trying to update one table. I'm using declarative extention for
all db operations. I have successfully implemented updates using
session after I first query the object and session keeps track of the
changes subsequently. but I think for what I do, that prior query is a
waste but prefer a straight update. Is this possible using declarative
ext ?

Thx.

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.