X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=1ac0c4b5de02992a83819ef8e02999369582d701;hb=227db2f1b21c06ec076c88f79850daf0f154b900;hp=524f85c83816f0400323e488760eb659fdb3bfe6;hpb=911e09c4a2d398265659c35c3a90c9edef4bff0d;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 524f85c8..1ac0c4b5 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -911,8 +911,8 @@ class Component(ORMObject): return NotImplemented def properties(self): - return ['component_name', 'component_id', 'description', 'location', \ - 'meets_dfsg'] + return ['component_name', 'component_id', 'description', \ + 'location_count', 'meets_dfsg', 'overrides_count'] def not_null_constraints(self): return ['component_name'] @@ -3144,8 +3144,7 @@ class DBConn(object): mapper(Location, self.tbl_location, properties = dict(location_id = self.tbl_location.c.id, component_id = self.tbl_location.c.component, - component = relation(Component, \ - backref=backref('location', uselist = False)), + component = relation(Component, backref='location'), archive_id = self.tbl_location.c.archive, archive = relation(Archive), # FIXME: the 'type' column is old cruft and @@ -3169,7 +3168,8 @@ class DBConn(object): suite = relation(Suite), package = self.tbl_override.c.package, component_id = self.tbl_override.c.component, - component = relation(Component), + component = relation(Component, \ + backref=backref('overrides', lazy='dynamic')), priority_id = self.tbl_override.c.priority, priority = relation(Priority, \ backref=backref('overrides', lazy='dynamic')),