Hi the list, Version 1.4Beta (hopefully 2.0 very soon)
I am writing a multitenant application and I need to filter all requests using subqueries. I succeeded to do it for selects doing something like that : *for desc in orm_execute_state.statement.column_descriptions: t = desc['type'] classname = desc['name'] scope = get_scope(classname) if scope != None: rights = check_rights(session, infos, role, scope) orm_execute_state.statement = orm_execute_state.statement.options( with_loader_criteria( t, t.id.in_(rights), include_aliases=True ) )* But I didn't find out how to do it for updates and deletes. If some of yours have an idea .... :) Thanks a lot, Fred -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/69ab301d-e223-4b5d-9e37-756ce5b04801n%40googlegroups.com.