[sqlalchemy] Re: NoSuchColumnError when process is forked.

2009-11-13 Thread Michael Bayer
Filipe Fernandes wrote: > > Also, the exception NoSuchColumnError never shows up until unique > indexes are applied thoughout the tables. then you have an unknown error. you should enable SQL + result set logging and see if in fact a SELECT is issued for the table without the primary key column

[sqlalchemy] Re: TypeError when appending to Associationproxy

2009-11-13 Thread Matthew R
Excellent, thank you. A few minutes after I posted I was able to figure out the NewsOrg.__init__ method fix, but the creator lambda argument to association_proxy is much cleaner. Thanks again! On Nov 13, 2:45 pm, Conor wrote: > Matthew R wrote: > > Hello, > > > Just getting started with associat

[sqlalchemy] Re: NoSuchColumnError when process is forked.

2009-11-13 Thread Filipe Fernandes
On Fri, Nov 13, 2009 at 2:16 PM, Michael Bayer wrote: > > ffernand wrote: >> >> I've been using sqlalchemy for the past couple months in development >> without incident until I started applying unique indexes.  I've had >> issues with duplicate rows as expected, but now i'm seeing a different >>

[sqlalchemy] Re: TypeError when appending to Associationproxy

2009-11-13 Thread Conor
Matthew R wrote: > Hello, > > Just getting started with association proxy and having trouble making > it work. The lookups seem to work fine but when I try to add a new > element to the association, I get "TypeError: __init__() takes exactly > 1 argument (2 given)". Code & test case below, I've le

[sqlalchemy] TypeError when appending to Associationproxy

2009-11-13 Thread Matthew R
Hello, Just getting started with association proxy and having trouble making it work. The lookups seem to work fine but when I try to add a new element to the association, I get "TypeError: __init__() takes exactly 1 argument (2 given)". Code & test case below, I've left a bunch of columns out fo

[sqlalchemy] Re: NoSuchColumnError when process is forked.

2009-11-13 Thread Michael Bayer
ffernand wrote: > > I've been using sqlalchemy for the past couple months in development > without incident until I started applying unique indexes. I've had > issues with duplicate rows as expected, but now i'm seeing a different > error that I hadn't seen before... > > NoSuchColumnError: "Could

[sqlalchemy] Re: Writing a new database dialect

2009-11-13 Thread Michael Bayer
Eric Smith wrote: > > I'm writing a new database dialect for sqlalchemy 0.6 for Netezza. This > is on Windows. I have an ODBC driver for Netezza. A couple of questions: > > - Why isn't there a generic "talk to an ODBC source" dialect? I >thought that was the beauty of ODBC. Is this possible an

[sqlalchemy] NoSuchColumnError when process is forked.

2009-11-13 Thread ffernand
I've been using sqlalchemy for the past couple months in development without incident until I started applying unique indexes. I've had issues with duplicate rows as expected, but now i'm seeing a different error that I hadn't seen before... NoSuchColumnError: "Could not locate column in row for

[sqlalchemy] Writing a new database dialect

2009-11-13 Thread Eric Smith
I'm writing a new database dialect for sqlalchemy 0.6 for Netezza. This is on Windows. I have an ODBC driver for Netezza. A couple of questions: - Why isn't there a generic "talk to an ODBC source" dialect? I thought that was the beauty of ODBC. Is this possible and just hasn't been done,

[sqlalchemy] Re: Query on a related object's field

2009-11-13 Thread Conor
Mike Conley wrote: > I haven't seen how to do this using the relation directly. I do: > > session.query(Someclass).join(OtherClass).filter_by(OtherClass.field==somevalue) > > > > > I did do some experimenting with a more abstract approach, but did not > find any need in my application. The only ad

[sqlalchemy] Re: Query on a related object's field

2009-11-13 Thread Mike Conley
I haven't seen how to do this using the relation directly. I do: session.query(Someclass).join(OtherClass).filter_by(OtherClass.field==somevalue) I did do some experimenting with a more abstract approach, but did not find any need in my application. The only advantage is that it takes away the

[sqlalchemy] Re: Query on a related object's field

2009-11-13 Thread Tefnet Developers - Tomasz Jezierski
Dnia 2009-11-13, Pt o godzinie 05:02 -0800, bojanb pisze: > What is the easiest way of getting the equivalent of this: > > session.query(Someclass).filter_by(related_obj.field=somevalue) > > Ie. I want to filter by a field of an object that is in relation to > objects of Someclass. > > My origi

[sqlalchemy] Query on a related object's field

2009-11-13 Thread bojanb
What is the easiest way of getting the equivalent of this: session.query(Someclass).filter_by(related_obj.field=somevalue) Ie. I want to filter by a field of an object that is in relation to objects of Someclass. My original idea was to add related_obj.field as a new relation in the mapper for