# sqlalchemy.exc.NoForeignKeysError: Could not determine join condition between parent/child tables on relationship 'User.addresses' - there are no foreign keys linking these tables. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify a 'primaryjoin' expression.

- **ID:** `python/sqlalchemy-missing-ondelete-option`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A relationship is defined without a foreign key constraint between the tables, or the FK is not properly declared.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   class Address(Base):
    __tablename__ = 'addresses'
    user_id = Column(Integer, ForeignKey('users.id'))
class User(Base):
    addresses = relationship('Address')
   ```
2. **** (80% success)
   ```
   class User(Base):
    addresses = relationship('Address', primaryjoin='User.id == Address.user_id')
   ```

## Dead Ends

- **** — It's just a regular column; no constraint. (60% fail)
- **** — May cause ambiguous joins. (50% fail)
