[sqlalchemy] Re: how does a class instance find its values

2009-07-25 Thread Werner F. Bruhin
Robert, robert rottermann wrote: ... however I would like to change the assignMyselfToCompany method in a way that I could achieve the same with: product = tblProducts_kl() product.assignMyselfToCompany(company_id) Unless you do some more things in your assignMyselfToCompany I think

[sqlalchemy] Re: how does a class instance find its values

2009-07-25 Thread robert rottermann
Werner F. Bruhin schrieb: Robert, robert rottermann wrote: ... however I would like to change the assignMyselfToCompany method in a way that I could achieve the same with: product = tblProducts_kl() product.assignMyselfToCompany(company_id) Unless you do some more things in your

[sqlalchemy] Re: how does a class instance find its values

2009-07-25 Thread Michael Bayer
On Jul 25, 2009, at 3:57 AM, robert rottermann wrote: Michael Bayer schrieb: robert rottermann wrote: hi there, how can an instance of a class with a Table bound to it access the values of the values of its db record? what I would like to do is something like the following: class

[sqlalchemy] Re: how does a class instance find its values

2009-07-25 Thread Michael Bayer
On Jul 25, 2009, at 7:24 AM, robert rottermann wrote: Werner F. Bruhin schrieb: this is exactly what I would like to do *within* the instance by calling one of its methods. the reason is, that there are many different product-types and each one has its own class that uses a common

[sqlalchemy] Re: how does a class instance find its values

2009-07-24 Thread Michael Bayer
robert rottermann wrote: hi there, how can an instance of a class with a Table bound to it access the values of the values of its db record? what I would like to do is something like the following: class company(Base): __table__ = 'tblCompany' ... def listAssignedProducts(self):