I have those tables setup : http://pastie.org/627764
...
# This is the association table for the many-to-many relationship between
# groups and members - this is, the memberships.
user_group_table = Table('user_group', metadata,
Column('user_name', Integer, ForeignKey('user.user_name',
onupdate="CASCADE", ondelete="CASCADE")),
Column('group_name', Integer, ForeignKey('group.group_name',
onupdate="CASCADE", ondelete="CASCADE"))
)
class Group(DeclarativeBase):
__tablename__ = 'group'
group_name = Column(Unicode(16), primary_key=True)
users = relation('User', secondary=user_group_table, backref='groups')
...
I'm trying to delete the relation between one user and one of his group but I can't really come up with a query that does it. Any way to do this using Sqlalchemy?
Thanks for your time.