diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/adjacencytree/basic_tree.py | 2 | ||||
| -rw-r--r-- | examples/adjacencytree/byroot_tree.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/adjacencytree/basic_tree.py b/examples/adjacencytree/basic_tree.py index 65e7d0da8..ac149d68a 100644 --- a/examples/adjacencytree/basic_tree.py +++ b/examples/adjacencytree/basic_tree.py @@ -114,7 +114,7 @@ print "tree new where node_id=%d:" % nodeid print "----------------------------" session.clear() -t = session.query(TreeNode).filter(TreeNode.c.id==nodeid)[0] +t = session.query(TreeNode).filter(TreeNode.id==nodeid)[0] print "\n\n\n----------------------------" print "Full Tree:" 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:" |
