[sqlalchemy] unexpected chained relations and append behaviour

2009-09-23 Thread Crusty
Hello everyone, I have a realy simple model for you to consider: 1 car has n wheels car.wheels is a relation from cars to wheels wheel.car is a backref to cars 1 car has n parts car.parts is a relation from car to parts I just wondered why my app was really getting slow, turned on SA debug

[sqlalchemy] Re: unexpected chained relations and append behaviour

2009-09-23 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Crusty Sent: 23 September 2009 15:48 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] unexpected chained relations and append behaviour Hello everyone, I have a

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 12:27 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 22, 2009, at 11:59 AM, Kevin H wrote: I'm having some trouble developing my model, and was hoping someone on this list could help... Here's what I want: A BizEntity object A Person and Company

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 10:57 AM, Kevin Horn kevin.h...@gmail.com wrote: On Wed, Sep 23, 2009 at 12:27 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 22, 2009, at 11:59 AM, Kevin H wrote: I'm having some trouble developing my model, and was hoping someone on this list

[sqlalchemy] ConFoo.ca call for speakers

2009-09-23 Thread Yannick Gingras
Greetings Alchemists, I'm coordinator for the Python track at the ConFoo.ca conference and I have an announcement to make that will certainly be of interest to many of you. PHP-Québec, Montréal-Python, Ruby Montréal, W3Qc, and OWASP Montréal are organizing the first edition of the ConFoo.ca

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Conor
You are missing a foreign key column in the people table that corresponds to your Person-Company relation. As a result, SQLAlchemy tries to use person.id as the foreign key column (because that column happens to be a foreign key to a base table of Company) and everything blows up. So: * Add a

[sqlalchemy] Want a custom implementation of get_bind that ignores metadata bindings

2009-09-23 Thread phrrn...@googlemail.com
I have a hidden WriterSession which I am using behind the scenes to manage a number of API entries that write data in bulk e.g. upsert (MappedClass, iterator_that_returns_dicts). I want the session to only look at its own binds and to ignore any that are in place on the metadata collection. I

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 5:34 PM, Conor conor.edward.da...@gmail.com wrote: You are missing a foreign key column in the people table that corresponds to your Person-Company relation. As a result, SQLAlchemy tries to use person.id as the foreign key column (because that column happens to be a

[sqlalchemy] Retrieving Unicode or utf-8 values

2009-09-23 Thread Joe
Hi, I'm having trouble converting an application that uses psycopg2 directly. The Postgres database is encoded in UTF-8. As an example, it has a column called title with the value 'Wilhelm R\xc3\xb6pke', i.e., 'Wilhelm Röpke'. With psycopg2, the connection and retrieval is done more or less