From: mike bayer Date: Fri, 19 Jul 2013 15:37:27 +0000 (-0700) Subject: Merge pull request #18 from davidjb/patch-1 X-Git-Tag: rel_0_8_3~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6069c75c2336421fd7b1c1397f87d33675eab27;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Merge pull request #18 from davidjb/patch-1 Minor hybrid extension documentation update --- diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 98da5ad366..b7f1f88a0a 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -229,7 +229,7 @@ mapping which relates a ``User`` to a ``SavingsAccount``:: account = Account(owner=self) else: account = self.accounts[0] - account.balance = balance + account.balance = value @balance.expression def balance(cls): @@ -269,7 +269,7 @@ Correlated Subquery Relationship Hybrid We can, of course, forego being dependent on the enclosing query's usage of joins in favor of the correlated subquery, which can portably be packed -into a single colunn expression. A correlated subquery is more portable, but +into a single column expression. A correlated subquery is more portable, but often performs more poorly at the SQL level. Using the same technique illustrated at :ref:`mapper_column_property_sql_expressions`, we can adjust our ``SavingsAccount`` example to aggregate the balances for