summaryrefslogtreecommitdiff
path: root/examples/adjacencytree/basic_tree.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-08-18 17:21:01 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-08-18 17:21:01 +0000
commitc48177f0fed3a43b3b8b02c18243cb1664ce0abb (patch)
tree1b4e70a8e4d64059fff906533cf14b35b8845946 /examples/adjacencytree/basic_tree.py
parentbd04cffad83848e3edc5cb51c51ca6232270477a (diff)
downloadsqlalchemy-c48177f0fed3a43b3b8b02c18243cb1664ce0abb.tar.gz
- unit-of-work does a better check for "orphaned" objects that are
part of a "delete-orphan" cascade, for certain conditions where the parent isnt available to cascade from. - it is now invalid to declare a self-referential relationship with "delete-orphan" (as the abovementioned check would make them impossible to save) - improved the check for objects being part of a session when the unit of work seeks to flush() them as part of a relationship..
Diffstat (limited to 'examples/adjacencytree/basic_tree.py')
-rw-r--r--examples/adjacencytree/basic_tree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/adjacencytree/basic_tree.py b/examples/adjacencytree/basic_tree.py
index 411133745..6a3470fa0 100644
--- a/examples/adjacencytree/basic_tree.py
+++ b/examples/adjacencytree/basic_tree.py
@@ -49,7 +49,7 @@ mapper(TreeNode, trees, properties=dict(
id=trees.c.node_id,
name=trees.c.node_name,
parent_id=trees.c.parent_node_id,
- children=relation(TreeNode, private=True, backref=backref("parent", foreignkey=trees.c.node_id)),
+ children=relation(TreeNode, cascade="all", backref=backref("parent", foreignkey=trees.c.node_id)),
))
print "\n\n\n----------------------------"