Hi, I want to remove an association in many to many relation, but I
don't want delete the related objects, just the association.
If I have:
ProjectUser = Table('PROJECT_USER', metadata,
Column('id_user', Integer, ForeignKey('USER.id_user')),
Column('id_project',Integer, ForeignKey('PROJECT.id_project')),
)
class Project(DeclarativeBase):
__tablename__ = 'PROJECT'
#{ Columns
id_project = Column(Integer, Sequence('id_project_seq'),
primary_key=True)
name = Column(Unicode(25), nullable=False)
description = Column(Unicode(200), nullable=False)
#{ Relations
users = relation("Users", secondary=ProjectUser,
backref=backref('projects',order_by=id_project))
I append a user with:
aProject.users.append(aUser)
But, if I want to delete this association between aProject and aUser,
how I must proceed?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en.