[sqlalchemy] Re: Self-referential with DeclarativeBase

2009-04-06 Thread Laurent Rahuel
Hi, As you are defining Country when you use it within your relation, you need to define your relation like this : parent = relation(Country, backref=backref('child'), cascade=all) Note the quotes around Country. Regards, Laurent Cedric a écrit : Hi, I'm trying to migrate my

[sqlalchemy] Re: Self-referential with DeclarativeBase

2009-04-06 Thread Cedric
Thanks Laurent, It solves the problem! Best Regards, Cédric On Apr 6, 6:23 pm, Laurent Rahuel laurent.rah...@gmail.com wrote: Hi, As you are defining Country when you use it within your relation, you need to define your relation like this : parent = relation(Country,