Hi!
I added a new self-referential relationship to one of my tables but since I
couldn't find how to create the new column through SA I added it to the db
manually after checking how it's been done before.
The code looks like this (using elixir):
class User(Entity):
username =
I am working on my localization stuff and run into a problem when I want
to add an relationship to a class.
I based my code on
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Views , but maybe I
messed something up.
The following works:
r1 = session.query(db.Region_LV).get(175)
print
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
foreign_keys=[Country_LV.__table__.c.fk_language_id])
I get:
sqlalchemy.exc.ArgumentError: Column-based
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
foreign_keys=[Country_LV.__table__.c.fk_language_id])
On Sep 7, 2011, at 11:53 AM, werner wrote:
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',
primaryjoin=Country_LV.fk_language_id==Language.id,
On 09/07/2011 05:58 PM, Michael Bayer wrote:
On Sep 7, 2011, at 11:53 AM, werner wrote:
Michael,
On 09/07/2011 05:10 PM, Michael Bayer wrote:
On Sep 7, 2011, at 4:40 AM, werner wrote:
or:
Region_LV.language = sao.relationship('Language',