put some )'s in the right place (I hope)

This commit is contained in:
Michael McGrath 2008-02-19 12:09:32 -06:00
parent f11fc5085c
commit 519eae37d4

View file

@ -27,6 +27,7 @@ from turbogears.database import metadata, mapper
# (see http://www.sqlalchemy.org/docs/04/ormtutorial.html)
from sqlalchemy import Table, Column, ForeignKey
from sqlalchemy.orm import relation
from sqlalchemy.ext.assignmapper import assign_mapper
# import some datatypes for table columns from SQLAlchemy
# (see http://www.sqlalchemy.org/docs/04/types.html for more)
from sqlalchemy import String, Unicode, Integer, DateTime
@ -183,24 +184,24 @@ class VisitIdentity(SABase):
#
# set up mappers between tables and classes
#
mapper(People, PeopleTable)
assign_mapper(People, PeopleTable)
mapper(PersonEmails, PersonEmailsTable, properties = {
person: relation(People, backref = 'emails',
collection_class = column_mapped_collection(
PersonEmailsTable.c.purpose)
PersonEmailsTable.c.purpose))
})
mapper(PersonRoles, PersonRolesTable, properties = {
member: relation(People, backref = 'roles'),
group: relation(Groups, backref='roles')
})
mapper(Configs, ConfigsTable, properties = {
person: relation(People, backref = 'configs'
person: relation(People, backref = 'configs')
})
mapper(Groups, GroupsTable)
mapper(GroupEmails, GroupEmailsTable, properties = {
group: relation(Group, backref = 'emails',
collection_class = column_mapped_collection(
GroupEmailsTable.c.purpose)
GroupEmailsTable.c.purpose))
})
# GroupRoles are complex because the group is a member of a group and thus
# is referencing the same table.