diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2013-07-19 08:37:27 -0700 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2013-07-19 08:37:27 -0700 |
commit | 261b46d9477b58dfabbefbe4e01c8c5a9f912f24 (patch) | |
tree | 935c740cbda8cfc5a497b24d777b944b1396007e | |
parent | 9c6e45ff0157cdd4139cdeb68d38867e2baeaeb5 (diff) | |
parent | f84d71fa3d65df04aebe46903d34f2c2a334b2fd (diff) | |
download | sqlalchemy-261b46d9477b58dfabbefbe4e01c8c5a9f912f24.tar.gz |
Merge pull request #18 from davidjb/patch-1
Minor hybrid extension documentation update
-rw-r--r-- | lib/sqlalchemy/ext/hybrid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 59e5a74cb..85106fbbe 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 |