I'm trying to do a n:m join of a table with itself.
Unfortunately, the accessor methods are named only by
the referenced table and thus get overwritten.
The same problem would occur if I had two *different*
RelatedJoins between two tables, which is not at all
unheard-of.
class ACLUser(sql.SQLObject):
"""\
This class represents a user (or group).
Names are not necessarily unique; for the most
part, visibility
rules control which ACLs anybody can see.
"""
name = sql.StringCol(length=40, notNone = True)
groups = sql.RelatedJoin('ACLUser',
joinColumn='user_id',
otherColumn='group_id',
intermediateTable='acl_roles')
members = sql.RelatedJoin('ACLUser',
joinColumn='group_id',
otherColumn='user_id',
intermediateTable='acl_roles',
createRelatedTable=False)