- changed status to resolved
fix many-to-many self referential aliasing in PropComparator._join_and_criterion
Issue #987
resolved
t_accounts = Table('accounts', metadata,
Column('id', Integer, primary_key=True),
Column('alias', Text(32), unique=True, nullable=False))
#...
t_friends = Table('friends', metadata,
Column('account_id', None, ForeignKey('accounts.id'), primary_key=True),
Column('friend_id', None, ForeignKey('accounts.id'), primary_key=True))
mapper(Account, t_accounts,
properties = {
'_friends': relation(Account, secondary=t_friends, backref='_friendof',
primaryjoin=t_accounts.c.id == t_friends.c.account_id,
secondaryjoin=t_accounts.c.id == t_friends.c.friend_id),
})
not_friends = Account.query().filter(not_(Account._friendof.contains(user_account0)))
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.4.6 (automated comment)
- Log in to comment
it was specifically the negation clause in contains(), cef292c0429b292466a486bd80723b6728273467