diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 19:19:03 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 19:19:03 -0400 |
| commit | c6bceb77754bd72c462ce146f706758d1ad3da4a (patch) | |
| tree | 0b9c935221c572bd75f3c88fe849fb17595e0a79 /examples/elementtree | |
| parent | 1675811029553501bb23084604c64d974dfe739c (diff) | |
| download | sqlalchemy-c6bceb77754bd72c462ce146f706758d1ad3da4a.tar.gz | |
- converted all lazy=True|False|None to 'select'|'joined'|'noload'
- converted all eager to joined in examples
- fixed beaker/advanced.py to reference RelationshipCache
Diffstat (limited to 'examples/elementtree')
| -rw-r--r-- | examples/elementtree/adjacency_list.py | 4 | ||||
| -rw-r--r-- | examples/elementtree/optimized_al.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/elementtree/adjacency_list.py b/examples/elementtree/adjacency_list.py index ad0f3f607..78d71f3fe 100644 --- a/examples/elementtree/adjacency_list.py +++ b/examples/elementtree/adjacency_list.py @@ -79,13 +79,13 @@ class _Attribute(object): # setup mappers. Document will eagerly load a list of _Node objects. mapper(Document, documents, properties={ - '_root':relationship(_Node, lazy=False, cascade="all") + '_root':relationship(_Node, lazy='joined', cascade="all") }) mapper(_Node, elements, properties={ 'children':relationship(_Node, cascade="all"), # eagerly load attributes - 'attributes':relationship(_Attribute, lazy=False, cascade="all, delete-orphan"), + 'attributes':relationship(_Attribute, lazy='joined', cascade="all, delete-orphan"), }) mapper(_Attribute, attributes) diff --git a/examples/elementtree/optimized_al.py b/examples/elementtree/optimized_al.py index 9cd2acc30..98c4e1129 100644 --- a/examples/elementtree/optimized_al.py +++ b/examples/elementtree/optimized_al.py @@ -80,7 +80,7 @@ class _Attribute(object): # they will be ordered in primary key/insert order, so that we can reconstruct # an ElementTree structure from the list. mapper(Document, documents, properties={ - '_nodes':relationship(_Node, lazy=False, cascade="all, delete-orphan") + '_nodes':relationship(_Node, lazy='joined', cascade="all, delete-orphan") }) # the _Node objects change the way they load so that a list of _Nodes will organize @@ -89,7 +89,7 @@ mapper(Document, documents, properties={ # ordering to rows which will suffice. mapper(_Node, elements, properties={ 'children':relationship(_Node, lazy=None), # doesnt load; used only for the save relationship - 'attributes':relationship(_Attribute, lazy=False, cascade="all, delete-orphan"), # eagerly load attributes + 'attributes':relationship(_Attribute, lazy='joined', cascade="all, delete-orphan"), # eagerly load attributes }) mapper(_Attribute, attributes) |
