summaryrefslogtreecommitdiff
path: root/examples/graphs/directed_graph.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/graphs/directed_graph.py')
-rw-r--r--examples/graphs/directed_graph.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/graphs/directed_graph.py b/examples/graphs/directed_graph.py
index 3ba602f00..b822cda89 100644
--- a/examples/graphs/directed_graph.py
+++ b/examples/graphs/directed_graph.py
@@ -29,19 +29,19 @@ class Node(Base):
class Edge(Base):
__tablename__ = 'edge'
- lower_id = Column(Integer,
- ForeignKey('node.node_id'),
+ lower_id = Column(Integer,
+ ForeignKey('node.node_id'),
primary_key=True)
- higher_id = Column(Integer,
- ForeignKey('node.node_id'),
+ higher_id = Column(Integer,
+ ForeignKey('node.node_id'),
primary_key=True)
lower_node = relationship(Node,
- primaryjoin=lower_id==Node.node_id,
+ primaryjoin=lower_id==Node.node_id,
backref='lower_edges')
higher_node = relationship(Node,
- primaryjoin=higher_id==Node.node_id,
+ primaryjoin=higher_id==Node.node_id,
backref='higher_edges')
# here we have lower.node_id <= higher.node_id