[sqlalchemy] Mapping and querying multiple levels of foreign key'd tables

2008-03-04 Thread Christoph Haas
Dear list... Actually I'm trying something rather simple so I'm surprised myself that it got me stuck. Bear with me that I'm not providing much code but the application is not written in english so the database models aren't either. Basically I have three tables like 'companies', 'departments' a

[sqlalchemy] Re: having problem with non_primary mapper in 0.4.3

2008-03-04 Thread Michael Bayer
On Mar 4, 2008, at 5:32 PM, Jonathan Vanasco wrote: > > this is self explanatory, but error is below > > i'm using sqlalchemy to reflect a table. it reads it fine. > when i try to assign a mapper, i get "has no attribute '_class_state'" > > looking at orm.mapper.py > > 734: >if self.non_

[sqlalchemy] Re: Integrating the ORM with Trellis

2008-03-04 Thread Phillip J. Eby
At 02:04 PM 3/3/2008 -0500, Michael Bayer wrote: >the bug is that unregister_attribute() is not working, which the test >suite is using to remove and re-register new instrumentation: > > class Foo(object): > pass > > attributes.register_attribute(Foo, "collection"

[sqlalchemy] Re: sqlachemy, mod_wsgi, and apache2, turbogears

2008-03-04 Thread Lukasz Szybalski
On Mon, Mar 3, 2008 at 8:56 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Mar 3, 2008, at 9:36 PM, Lukasz Szybalski wrote: > > > I'll add > > sqlalchemy.pool_recycle = 3600 to my prod.cfg (turbogears) > > > > How is the pool recycle going to affect performance? > > used properly, poo

[sqlalchemy] having problem with non_primary mapper in 0.4.3

2008-03-04 Thread Jonathan Vanasco
this is self explanatory, but error is below i'm using sqlalchemy to reflect a table. it reads it fine. when i try to assign a mapper, i get "has no attribute '_class_state'" looking at orm.mapper.py 734: if self.non_primary: self._class_state = self.class_._class_state

[sqlalchemy] Re: Python 2.6 hash behavior change

2008-03-04 Thread Michael Bayer
On Mar 4, 2008, at 4:26 AM, Denis S. Otkidach wrote: > > On Mon, Mar 3, 2008 at 8:23 PM, Michael Bayer <[EMAIL PROTECTED] > > wrote: >> We define __eq__() all over the place so that would be a lot of >> __hash__() methods to add, all of which return id(self). I wonder if >> we shouldn't just m

[sqlalchemy] Re: AuditLog my first attempt

2008-03-04 Thread svilen
On Tuesday 04 March 2008 12:34:11 Marco De Felice wrote: > So after some coding and thanks to sdobrev previous reply I came up > with the following mapperextension that allows for a client side > update log to a different table (logtable name = table_prefix + > original table name) with a logopera

[sqlalchemy] AuditLog my first attempt

2008-03-04 Thread Marco De Felice
So after some coding and thanks to sdobrev previous reply I came up with the following mapperextension that allows for a client side update log to a different table (logtable name = table_prefix + original table name) with a logoperation field added. Any comment is welcome as I don't really know

[sqlalchemy] Re: Python 2.6 hash behavior change

2008-03-04 Thread Denis S. Otkidach
On Mon, Mar 3, 2008 at 8:23 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > We define __eq__() all over the place so that would be a lot of > __hash__() methods to add, all of which return id(self). I wonder if > we shouldn't just make a util.Mixin called "Hashable" so that we can > centralize