[sqlalchemy] Re: Doubts on relation with cascade delete by backend

2009-07-25 Thread Alessandro Dentella
On Thu, Jul 23, 2009 at 02:48:12PM -0400, Michael Bayer wrote: add passive_deletes = True Thanks and sorry for the noise on such trivial question, present in the faq... , I've already used it and... forgot! sandro --~--~-~--~~~---~--~~ You received this

[sqlalchemy] delete-orphan assigning fk. Related to FAQ 5.13

2009-07-25 Thread Alessandro Dentella
In faq 5.13 it's explained why setting bar.foo_id would not generate the object bar.foo. I stumble in the same problem when creating a Movie in an example with Director/Movie and a relation -'movies' on director- that has 'delete-orphan'. running:: f = m.Movie(title=my title)

[sqlalchemy] delete-orphan assigning fk. Related to FAQ 5.13

2009-07-25 Thread Alessandro Dentella
[Sorry for reposting, Erroneously sent to another thread.] In faq 5.13 it's explained why setting bar.foo_id would not generate the object bar.foo. I stumble in the same problem when creating a Movie in an example with Director/Movie and a relation -'movies' on director- that has

[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: delete-orphan assigning fk. Related to FAQ 5.13

2009-07-25 Thread Michael Bayer
On Jul 25, 2009, at 5:19 AM, Alessandro Dentella wrote: In faq 5.13 it's explained why setting bar.foo_id would not generate the object bar.foo. I stumble in the same problem when creating a Movie in an example with Director/Movie and a relation -'movies' on director- that has

[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: Unsaved, pending instance and is an orphan problem

2009-07-25 Thread Michael Bayer
On Jul 24, 2009, at 10:33 AM, Michael Bayer wrote: Michael Bayer wrote: Victor Lin wrote: It is a TODO within SQLAlchemy for this particular operation to not trigger an unnecessary load. I've added a patch as well as your test as http://www.sqlalchemy.org/trac/ticket/1483 to address