[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

[sqlalchemy] Re: updates using declarative extention

2011-06-15 Thread Liju
Cool that worked. This is what I have done. result = session.query(Purchaser).filter(Purchaser.id==purchaser.id).update({'name':purchaser.name,'status':purchaser.status}) Thx Mike. On Jun 15, 6:21 pm, Mike Conley mconl...@gmail.com wrote:

[sqlalchemy] mapper error, and db object cannot be incremented

2011-06-14 Thread Liju
I'm new to SQLAlchemy. I wrote a method that retrieves a record, update the object after incrementing it by 1, and return that record object to the caller (pyramid view). Following is the test function. I get following errors : 1) when I call this method multiple times, I get an error that say

[sqlalchemy] Re: mapper error, and db object cannot be incremented

2011-06-14 Thread Liju
Thank you so much Michael. By the way SQLAlchemy and Mako template are so cool. Thank you so much for all your efforts. Liju. On Jun 14, 9:38 am, Michael Bayer mike...@zzzcomputing.com wrote: You're best starting with the declarative usage patterns described in the ORM tutorial athttp

[sqlalchemy] SQLAlchemy best practise

2011-06-06 Thread Liju
I'm new to SQLAlchemy and loving it. But reading all documentation online makes me wonder if there are any best practice documentation for sqlalchemy out there ? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to