diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-03 23:38:48 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-03 23:38:48 +0000 |
commit | 6f1eb443a358f41f2dd38bac065b98fad54a67ce (patch) | |
tree | 0fff3ed11eadf632d59555a4f4180599275d8fa8 /examples/vertical/vertical.py | |
parent | bbd7c660560212844de3a92ba077bcec77740b16 (diff) | |
download | sqlalchemy-6f1eb443a358f41f2dd38bac065b98fad54a67ce.tar.gz |
- "custom list classes" is now implemented via the "collection_class"
keyword argument to relation(). the old way still works but is
deprecated [ticket:212]
Diffstat (limited to 'examples/vertical/vertical.py')
-rw-r--r-- | examples/vertical/vertical.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/vertical/vertical.py b/examples/vertical/vertical.py index 66224fb5b..d4c8b9cae 100644 --- a/examples/vertical/vertical.py +++ b/examples/vertical/vertical.py @@ -50,9 +50,6 @@ class Entity(object): method is overridden to set all non "_" attributes as EntityValues within the _entities dictionary. """ - # establish the type of '_entities' - _entities = EntityDict - def __getattr__(self, key): """getattr proxies requests for attributes which dont 'exist' on the object to the underying _entities dictionary.""" @@ -125,7 +122,7 @@ mapper( ) mapper(Entity, entities, properties = { - '_entities' : relation(EntityValue, lazy=False, cascade='save-update') + '_entities' : relation(EntityValue, lazy=False, cascade='save-update', collection_class=EntityDict) }) # create two entities. the objects can be used about as regularly as |