Skip to content
Snippets Groups Projects
Commit 3fcbc724 authored by Françoise Conil's avatar Françoise Conil
Browse files

Association object : ajout d'éléments, test syntaxe

parent 53f5313e
No related branches found
No related tags found
No related merge requests found
...@@ -91,10 +91,12 @@ if __name__ == "__main__": ...@@ -91,10 +91,12 @@ if __name__ == "__main__":
pc = ParentChild(rank=1) pc = ParentChild(rank=1)
pc.child = john pc.child = john
jack.children.append(pc) # jack.children.append(pc)
pc.parent = jack
with session.begin(): with session.begin():
session.add(jack) session.add(jack)
session.add(john)
session.add(pc) session.add(pc)
# iterate through child objects via association, including association # iterate through child objects via association, including association
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment