From 338300a538a25a187485c5929812100aa19964de Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 17 Nov 2008 21:58:30 -0500 Subject: [PATCH] Turn on lazy loading for all tables svn path=/trunk/packages/invirt-database/; revision=1714 --- debian/changelog | 6 ++++++ python/database/models.py | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index a763df1..f1680a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-database (0.1.0) unstable; urgency=low + + * Turn on lazy loading for all tables + + -- Evan Broder Mon, 17 Nov 2008 21:57:35 -0500 + invirt-database (0.0.6) unstable; urgency=low * Let machines.administrator be NULL diff --git a/python/database/models.py b/python/database/models.py index 0bdb5d3..e3f2996 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -120,10 +120,10 @@ class Autoinstall(object): return "" % (self.autoinstall_id, self.description, self.type.type_id) session.mapper(Machine, machine_table, - properties={'nics': relation(NIC, backref="machine", lazy=False), - 'disks': relation(Disk, backref="machine", lazy=False), - 'type': relation(Type, lazy=False), - 'acl': relation(MachineAccess, backref="machine", lazy=False, passive_deletes=True, cascade="all, delete-orphan")}); + properties={'nics': relation(NIC, backref="machine"), + 'disks': relation(Disk, backref="machine"), + 'type': relation(Type), + 'acl': relation(MachineAccess, backref="machine", passive_deletes=True, cascade="all, delete-orphan")}); session.mapper(MachineAccess, machine_access_table) session.mapper(NIC, nic_table) session.mapper(Disk, disk_table) -- 1.7.9.5