There are two tables like:
***********************************************
left_table = Table('left', metadata,
Column('id', Integer, primary_key=True))
right_table = Table('right', metadata,
Column('id', Integer, primary_key=True))
association_table = Table('association', metadata,
Column('left_id', Integer, ForeignKey('left.id')),
Column('right_id', Integer, ForeignKey('right.id')),
)
mapper(Parent, left_table, properties={
'children': relation(Child, secondary=association_table)
})
mapper(Child, right_table)
***********************************************
What is the best way to count "right_id" in association_table? I need
to khow how many right_id relations.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.