]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Corrected docs for declarative synonym incorrectly referring to instruments instead...
authorMichael Trier <mtrier@gmail.com>
Sun, 5 Oct 2008 03:30:58 +0000 (03:30 +0000)
committerMichael Trier <mtrier@gmail.com>
Sun, 5 Oct 2008 03:30:58 +0000 (03:30 +0000)
doc/build/content/plugins.txt

index 80e6c9fbb34e3d9e2222dd4cc011bbf93f59a983..d896ff33cad6b7c5d1bdb75f10d57653883326e2 100644 (file)
@@ -123,7 +123,7 @@ class after the fact:
     User.addresses = relation(Address, primaryjoin=Address.user_id==User.id)
 
 Synonyms are one area where `declarative` needs to slightly change the usual SQLAlchemy configurational syntax. To define a
-getter/setter which proxies to an underlying attribute, use `synonym` with the `instruments` argument:
+getter/setter which proxies to an underlying attribute, use `synonym` with the `descriptor` argument:
 
     {python}
     class MyClass(Base):
@@ -133,9 +133,9 @@ getter/setter which proxies to an underlying attribute, use `synonym` with the `
         
         def _get_attr(self):
             return self._some_attr
-        def _set_attr(self, attr)
+        def _set_attr(self, attr):
             self._some_attr = attr
-        attr = synonym('_attr', instruments=property(_get_attr, _set_attr))
+        attr = synonym('_attr', descriptor=property(_get_attr, _set_attr))
         
 The above synonym is then usable as an instance attribute as well as a class-level expression construct: