diff options
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) |
