Re: [sqlalchemy] Re: many-to-many orm warnings

2022-03-10 Thread Michael Merickel
Thank you Mike. Really appreciate you unpacking my rambling. This works for me. I found a few spots in our codebase where we were relying on append() working because it really was a simple link table but I rewrote them to just create the link manually and add it to the session which also causes the

Re: [sqlalchemy] Re: many-to-many orm warnings

2022-03-10 Thread Mike Bayer
hey there. The warnings go away entirely by making Parent.children viewonly=True, which for this type of mapping is recommended: class Parent(Base): __tablename__ = "left" id = Column(Integer, primary_key=True) children = relationship( "Child", secondary=Association.__table__

[sqlalchemy] role level access

2022-03-10 Thread Ronak Patel
I've two roles in database 1. Manager 2. User now I need to fetch the User under the particular manager, so what I need to do? Thank you! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Co