# sqlalchemy.exc.InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.

- **ID:** `python/sqlalchemy-unhashable-condition`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using a bulk update/delete with a complex expression that SQLAlchemy cannot evaluate in the session, especially with certain database-specific functions.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   session.query(User).filter(User.age > 30).update({'active': False}, synchronize_session=False)
   ```
2. **** (90% success)
   ```
   session.query(User).filter(User.age > 30).update({'active': False}, synchronize_session='fetch')
   ```

## Dead Ends

- **** — Default is 'auto' which may still fail for complex criteria. (50% fail)
- **** — May bypass ORM features but not always desired. (30% fail)
