# 字段错误：无法将关键字 'author_name' 解析为字段。可选字段：author, author_id, title, published_date

- **ID:** `python/django-orm-query-inefficiency`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

尝试按不存在的字段名过滤，可能是由于错误的相关字段访问。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Use correct related field: Book.objects.filter(author__name='John') if Author has name field.
   ```
2. **** (90% 成功率)
   ```
   Check model fields and use exact field names: author.name if author is FK.
   ```

## 无效尝试

- **** — Using author__name instead of author__name__icontains still fails if field doesn't exist. (60% 失败率)
- **** — Adding a property to model doesn't make it queryable in ORM. (80% 失败率)
