# sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column 'table.column' could not find table 'other_table' with which to generate a foreign key to target column 'id'

- **ID:** `python/sqlalchemy-no-referenced-table`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

外键引用的表名或模型名拼写错误或未定义。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.4.x | active | — | — |
| 2.0.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   确保引用的表名与 __tablename__ 一致，例如：ForeignKey('other_table.id')
   ```
2. **** (85% success)
   ```
   在模型中定义所有相关表，并确保导入顺序正确。
   ```

## Dead Ends

- **** — 尝试在数据库中手动创建表，但 ORM 映射仍然无法找到。 (50% fail)
- **** — 修改外键列名为其他名称，但未更新关系定义。 (60% fail)
