From ee02ff4a380366a4d1f630d70295b66665e00bf8 Mon Sep 17 00:00:00 2001 From: Konsta Vesterinen Date: Tue, 21 Jan 2014 13:49:15 +0200 Subject: [PATCH] Add explanation --- sqlalchemy_utils/aggregates.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sqlalchemy_utils/aggregates.py b/sqlalchemy_utils/aggregates.py index 0543d2b..6f4af3d 100644 --- a/sqlalchemy_utils/aggregates.py +++ b/sqlalchemy_utils/aggregates.py @@ -198,6 +198,9 @@ to define lots of relationships pointing to same class, remember to define the r Multi-level aggregates ---------------------- +Aggregates can span accross multiple relationships. In the following example each +Catalog has a net_worth which is the sum of all products in all categories. + :: @@ -236,6 +239,7 @@ Multi-level aggregates category_id = sa.Column(sa.Integer, sa.ForeignKey(Category.id)) + TODO ----