On 4/4/07, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
> I often use a different technique. Instead of keeping two lines in the
> association table, I only keep one and make a rule that relateditem1
> <= relateditem2.
>
> Here is the thread on graphs where Mike posted a working solution:
> http://groups.google.com/group/sqlalchemy/browse_frm/thread/4d81b50fbfd84195/8ea809a9532ad6ca
>
> The pastebin link in the thread doesn't work any more, but the code
> can be found here:
> http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/examples/graphs/graph1.py

One thing I forgot: for convenience I add a method on Node defined like this:

@property
def neighbors(self):
    return self.higher_neighbors() + self.lower_neighbors()

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to