# sqlalchemy.exc.InvalidRequestError: Multiple classes found for path 'User' in the registry of this declarative base. Please use a fully module-qualified path.

- **ID:** `python/sqlalchemy-orm-multiple-heads`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two different classes with the same name are registered in the same declarative base, often due to duplicate imports or class name collisions.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   # Use from app.models.user import User consistently
from app.models.user import User
# Avoid: from app.models import User if it's defined elsewhere
   ```
2. **** (85% success)
   ```
   from app.models import User as UserModel
# Use UserModel in code
   ```

## Dead Ends

- **** — Breaks existing references to the original class name in other parts of the code. (70% fail)
- **** — Causes ambiguity in relationship resolution and can lead to unexpected behavior. (80% fail)
