跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/mturac/everything-openai-codex/jpa-patterns

Codex Check Spring Data JPA List Queries for N+1 Reads

Use lazy loading, targeted fetches, or projections to control Spring Boot reads and verify both results and SQL.

中文

Install in Codex

Use Spring Boot with Hibernate and a local test database. The exercise uses synthetic catalog items and categories.

  1. Copy the pinned `docs/zh-CN/skills/jpa-patterns/` directory into `.agents/skills/jpa-patterns/` in the project.
  2. Give Codex the entities, repository method, and display fields. Capture the current SQL and result set.

Example task

Create five fictional products and two categories. Display only product and category names. Compare current mapping with a DTO projection and inspect order and SQL.

What to check

The projection preserves fields and order, and the SQL trace shows category data arrives without a separate query per product.

Original SKILL.md on GitHub · Updated 2026-11-13

Frequently asked question

Should all associations become eager?

Choose loading strategies based on the read path, then verify SQL so changes do not increase loading on unrelated queries.

Related skills from this repository

  • Codex Verify Local TypeScript Scripts and Unit Tests with Bun
  • Codex Build a VS Code CodeTour with File and Line Anchors
Browse Codex skills in the Chinese directory
词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯