[sqlalchemy] Re: Error with primaryjoin in relation() in 0.4.1

2007-12-29 Thread Jonathan Gardner
Michael Bayer wrote: > the error is because of the allow_column_override, combined with the > fact that you haven't reassigned the column attributes for "left" and > "right". the "left" and "right" columns on table2 need to be > available as scalar attributes on your Table2 class since tha

[sqlalchemy] Re: Error with primaryjoin in relation() in 0.4.1

2007-12-29 Thread Jonathan Gardner
I found the problem goes away if I don't try to overload the names, Still, it would be nice if this wasn't cause a problem. The solution is to rename the columns in table2 to right_id and left_id, and to not use the allow_column_override option in the mapper() function. If that isn't an option,

[sqlalchemy] Re: Error with primaryjoin in relation() in 0.4.1

2007-12-29 Thread Michael Bayer
On Dec 29, 2007, at 12:46 AM, Jonathan Gardner wrote: > > I'm getting a strange error when I specify primaryjoin in relation(). the error is because of the allow_column_override, combined with the fact that you haven't reassigned the column attributes for "left" and "right". the "left" an