Adapt code to prevent new warnings and errors (as of SQLAlchemy 1.4):
- Overlapping foreign key columns could be set in a conflicting way
=> This is prevented by the application logic
=> Ignore the warning by setting a `overlaps` flag
- Transaction already rolled back
=> This only happens when tests cause an `IntegrityError` on purpose
=> Filter away the corresponding warning in the fixture
- Query returns `Row` objects and not scalars
=> Add genexpr to pull out `primary_id`