class Comment(ActiveMapper):
class mapping:
__table__= "comment"
comment_id = column(Integer, primary_key=True)
...
parent_id = column(Integer, default=-1)
sub_comments = one_to_many("Comment", colname="comment_id",
backref="parent_id")
The sqlalchemy exception is:
ArgumentError: Cant find any foreign key relationships between
'comment' and 'comment'
I can see how that might be the case. Is there a recommended way of
doing this using ActiveMapper or do I need to revert to a Table +
mapper setup as exemplified in the zblog code in the sqlalchemy svn
repos
(http://www.sqlalchemy.org/trac/browser/zblog/trunk/lib/zblog/database)?
Cheers,
Graham