Hello Felix,
No I want to get all items from table A where no matching item in table B
exists. I'm aware that this would be very easy if table A stores the
foreign key.
SQLAlchemy supports the NOT EXISTS syntax through the any() / has()
methods. You should be able to do something like this:
Hi!
Or something like
s.query(A).filter(not_(A.column.in_(select(table_b.c.column))
David
Empty napsal(a):
Hello Felix,
No I want to get all items from table A where no matching item in table B
exists. I'm aware that this would be very easy if table A stores the
foreign key.