{
  "id": "python/django-orm-related-field-error",
  "signature": "django.core.exceptions.FieldError: Related Field got invalid lookup: icontains",
  "signature_zh": "字段错误：关联字段获得无效查找：icontains",
  "regex": "django\\.core\\.exceptions\\.FieldError:\\ Related\\ Field\\ got\\ invalid\\ lookup:\\ icontains",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "在关联字段上使用了不支持的查找类型",
  "root_cause_type": "generic",
  "root_cause_zh": "对ForeignKey或ManyToManyField使用了不适用于关联字段的查找操作",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "可能无法实现模糊搜索需求",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "查询不会返回结果",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Article.objects.filter(author__name__icontains='john')",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "author = Author.objects.get(name__icontains='john'); articles = author.article_set.all()",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}