From: Evan Broder Date: Tue, 28 Oct 2008 07:16:32 +0000 (-0400) Subject: Add attributes to the ORM to link mirrors and cdroms X-Git-Tag: 0.0.3^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/commitdiff_plain/0c0d546ff44020192115b52af0268f3121e954cf Add attributes to the ORM to link mirrors and cdroms svn path=/trunk/packages/invirt-database/; revision=1363 --- diff --git a/debian/changelog b/debian/changelog index 73c5c08..de08e10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-database (0.0.3) unstable; urgency=low + + * Add attributes to the ORM objects to connect mirrors and cdroms + + -- Evan Broder Tue, 28 Oct 2008 03:16:18 -0400 + invirt-database (0.0.2) unstable; urgency=low * Export mirrors_table and Mirrors from invirt.database.models diff --git a/python/database/models.py b/python/database/models.py index e44aff3..625e04b 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -128,7 +128,8 @@ session.mapper(NIC, nic_table) session.mapper(Disk, disk_table) session.mapper(Type, types_table) session.mapper(Mirror, mirrors_table) -session.mapper(CDROM, cdroms_table) +session.mapper(CDROM, cdroms_table, + properties={'mirror': relation(Mirror, backref="cdroms")}) session.mapper(Autoinstall, autoinstalls_table) def clear_cache():