diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-07-14 19:44:37 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-07-14 19:44:37 +0000 |
commit | 01bce5c129cacd8717510922ef63c3d40fe9381c (patch) | |
tree | de4de1f03f161db313e30a3f8e2d43af1320fb68 /examples/adjacencytree/byroot_tree.py | |
parent | 05b44779a74d8ba74202c573bc68a3528c800558 (diff) | |
download | sqlalchemy-01bce5c129cacd8717510922ef63c3d40fe9381c.tar.gz |
fix adjacency list examples
Diffstat (limited to 'examples/adjacencytree/byroot_tree.py')
-rw-r--r-- | examples/adjacencytree/byroot_tree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/adjacencytree/byroot_tree.py b/examples/adjacencytree/byroot_tree.py index e57b11bee..e4ca4295a 100644 --- a/examples/adjacencytree/byroot_tree.py +++ b/examples/adjacencytree/byroot_tree.py @@ -89,7 +89,7 @@ class TreeLoader(MapperExtension): if instance.root is instance: connection.execute(mapper.mapped_table.update( - TreeNode.c.id==instance.id, values=dict(root_id=instance.id))) + TreeNode.id==instance.id, values=dict(root_id=instance.id))) instance.root_id = instance.id def append_result(self, mapper, selectcontext, row, instance, result, **flags): @@ -224,8 +224,8 @@ session.clear() # sub-tree in one pass. the MapperExtension will assemble the incoming # nodes into a tree structure. t = (session.query(TreeNode). - filter(TreeNode.c.root_id==nodeid). - order_by([TreeNode.c.id]))[0] + filter(TreeNode.root_id==nodeid). + order_by([TreeNode.id]))[0] print "\n\n\n----------------------------" print "Full Tree:" |