* Add primaryjoin information where SQLAlchemy can become confused as to
which foreign key is used for a relation.
This commit is contained in:
parent
8c8b2f723a
commit
5ac6e4b83e
1 changed files with 4 additions and 2 deletions
|
@ -192,7 +192,8 @@ mapper(PersonEmails, PersonEmailsTable, properties = {
|
|||
PersonEmailsTable.c.purpose))
|
||||
})
|
||||
mapper(PersonRoles, PersonRolesTable, properties = {
|
||||
'member': relation(People, backref = 'roles'),
|
||||
'member': relation(People, backref = 'roles',
|
||||
primaryjoin=PersonRolesTable.c.person_id==PeopleTable.c.id),
|
||||
'group': relation(Groups, backref='roles')
|
||||
})
|
||||
mapper(Configs, ConfigsTable, properties = {
|
||||
|
@ -214,7 +215,8 @@ mapper(GroupRoles, GroupRolesTable, properties = {
|
|||
})
|
||||
mapper(BugzillaQueue, BugzillaQueueTable, properties = {
|
||||
'group': relation(Groups, backref = 'pending'),
|
||||
'person': relation(People, backref = 'pending')
|
||||
'person': relation(People, backref = 'pending',
|
||||
primaryjoin=BugzillaQueueTable.c.person_id==PeopleTable.c.id)
|
||||
})
|
||||
|
||||
# TurboGears Identity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue