[Sqlalchemy-tickets] Issue #3698: Error in Directed Graph Documentation (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: John M. <iss...@bi...> - 2016-04-26 21:11:58
|
New issue 3698: Error in Directed Graph Documentation https://bitbucket.org/zzzeek/sqlalchemy/issues/3698/error-in-directed-graph-documentation John Mercouris: If you look in the examples, the documentation mentions that you may setup directed graphs: http://docs.sqlalchemy.org/en/rel_1_0/orm/examples.html#module-examples.graphs The code for the directed graph can be found here: http://docs.sqlalchemy.org/en/rel_1_0/_modules/examples/graphs/directed_graph.html Unfortunately the code for the directed graph is actually for an undirected graph (directed vs undirected graph) http://www.differencebetween.com/wp-content/uploads/2011/05/DifferenceBetween_Directed_UnDirected_Graphs1.jpg The reason it is a directed graph is because you may not add a relationship from n1->n2 as well as from n2->n1. The program will crash and complain that there is a duplicate entry. For your convenience I have modified the program to show an example of a directed graph: (http://pastebin.com/xJDPdvYJ) - also attached to this issue. Also attached is the database generated from running the file. You can run the program to demonstrate it for yourself, thank you for your time. |