I have a table that has millions of rows. I want to delete multiple rows via an in clause. However, using the code:
session.query(Users).filter(Users.id.in_(sub
The below solution also works, if developers do not want to execute a plain vanilla query.
session.query(Users).filter(Users.id.in_(subquery....)).delete(synchronize_session=False)