# sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one()

- **ID:** `python/sqlalchemy-orm-exc-multiple-results-found`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using the .one() method when the query returns more than one row, which expects exactly one result.

## Version Compatibility

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

## Workarounds

1. **Use one_or_none() method** (90% success)
   ```
   Use .one_or_none() to handle zero or one result, then check for None.
   ```
2. **Add unique constraints to query** (95% success)
   ```
   Refine the query with additional filters to ensure uniqueness, e.g., filter by primary key.
   ```

## Dead Ends

- **Using .first() without addressing duplicates** —  (70% fail)
- **Adding LIMIT 1 to query** —  (50% fail)
