Re: [sqlalchemy] SQLAlchemy Many-to-Many Users, Groups, Roles

2017-10-20 Thread Leslie Luyt
This is fantastic, I didn't realise you could define a table using a sql expression. I am always amazed by how amazing and configurable SQLAlchemy is. Thank you so much for the help with this. PS. I am a huge fan. Please give Dilly a pat for me =). On Saturday, October 21, 2017 at 5:14:28 AM

Re: [sqlalchemy] SQLAlchemy Many-to-Many Users, Groups, Roles

2017-10-20 Thread Leslie Luyt
Here is my example: class Role(Base): __tablename__ = 'role' role_id = Column(BigInteger, primary_key=True) role_name = Column(String, nullable=False) role_description = Column(String) class Group(Base): __tablename__ = 'group' group_id = Column(BigInteger,

[sqlalchemy] SQLAlchemy Many-to-Many Users, Groups, Roles

2017-10-20 Thread Leslie Luyt
I am trying to integrate with an existing user-group-role table structure where a user can belong to many groups and have multiple roles on each group. I found a similar question to this, however it does not allow for multiple roles: Many-to-many declarative SQLAlchemy definition for