RE: [sqlalchemy] Self-referencing row and CircularDependencyError

2013-05-27 Thread Alexey Vihorev
Ah, stupid me. Thanks! From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: Monday, May 27, 2013 6:26 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Self-referencing row and CircularDependencyError On May 27, 2013, at 5:16

Re: [sqlalchemy] Self-referencing row and CircularDependencyError

2013-05-27 Thread Michael Bayer
On May 27, 2013, at 5:16 AM, Alexey Vihorev wrote: > Hi! > > Can I handle this situation properly, if at all? > > Base = declarative_base() > > class Person(Base): > __tablename__ = 'persons' > id = Column(Integer, primary_key=True) > best_friend_id = Column(Integer, ForeignKey