Ok, I get it working. See below.
On Dec 7, 2007 4:09 PM, Bert Wesarg <[EMAIL PROTECTED]> wrote: > Hello all, > > I need a little help, guidance to get a Many-to-Many Adjacency > Relationships, a.k.a. a dependency graph working. > > Here is the short code: > > metadata = MetaData('sqlite:///') > > tasks_table = Table('tasks', metadata, > Column('id', Integer, primary_key = True), > Column('name', String()), > ) > > task_depends_on_tasks_table = Table('task_depends_on_tasks', metadata, > Column('task_id', Integer, ForeignKey('tasks.id')), > Column('dependent_id', Integer, ForeignKey('tasks.id')), > ) > > metadata.create_all() > > class Task(object): > def __init__(self, name): > self.name = name > > The problem is off cause the mapping configuration, some blindly > copy'n'pasting ended up in this: > > m = mapper(Task, tasks_table, > properties = { > 'dependsOn' : relation(Task, > secondary = task_depends_on_tasks_table, > remote_side = [tasks_table.c.id], remote_side = [task_depends_on_tasks_table.c.dependent_id], Bert --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---