{"enrichment":{"faq":[{"a":"spring-data-jpa repositories are created by extending the Repository interface or its subinterfaces like CrudRepository or JpaRepository. Define an interface with generic type parameters for your entity and ID type, then Spring Data JPA automatically generates CRUD operation implementations at runtime. You can add custom query methods using derived method names or @Query annotations without writing implementation code.","q":"How do you create JPA repositories in Spring Data JPA?"},{"a":"spring-data-jpa supports one-to-one, one-to-many, many-to-one, and many-to-many relationships using @OneToOne, @OneToMany, @ManyToOne, and @ManyToMany annotations. Configure cascade types to control how operations propagate (PERSIST, MERGE, REMOVE, REFRESH, DETACH, ALL), set fetch strategies (LAZY or EAGER), and use mappedBy to define the owning side of bidirectional relationships for proper database synchronization.","q":"What are spring data jpa entity relationships and how do you configure them?"},{"a":"spring-data-jpa prevents N+1 problems using @EntityGraph annotations to specify which relationships to eagerly load in a single query, or by using JOIN FETCH in @Query methods. Define named entity graphs on your entity class with @NamedEntityGraph, then reference them in repository methods to control exactly which associations load together, avoiding cascading SELECT queries.","q":"How does spring data jpa prevent N+1 query problems?"},{"a":"spring-data-jpa pagination is configured by adding a Pageable parameter to repository methods and returning Page<T> instead of List<T>. Spring automatically handles limit, offset, and sorting. Create Pageable instances using PageRequest.of(pageNumber, pageSize, Sort.by(...)) in your service layer, then pass to repository methods that support pagination for efficient large dataset handling.","q":"What pagination setup is needed with Spring Data JPA?"},{"a":"spring-data-jpa @Query annotations let you write custom JPQL or native SQL queries directly on repository methods. Use parameter binding with @Param, projections to fetch only needed columns, and JOIN FETCH for relationships. Combine with @Modifying for UPDATE/DELETE operations and @Transactional for write operations to optimize performance beyond derived query capabilities.","q":"How do you write efficient queries using @Query annotations in spring-data-jpa?"},{"a":"spring-data-jpa enables auditing by adding @EnableJpaAuditing to your configuration class and annotating entity fields with @CreatedDate, @LastModifiedDate, @CreatedBy, and @LastModifiedBy. Implement AuditorAware<T> to provide current user information, then Spring automatically populates timestamps and user references on entity creation and modification without manual code.","q":"How is database auditing configured in Spring Data JPA?"}],"shadow_tags":["orm-framework","query-optimization","data-persistence","relationship-mapping","performance-tuning","transaction-management","database-indexing","lazy-loading-strategy"],"summary_rewrite":"Build data access layers with Spring Data JPA repository interfaces, entity relationships, and query patterns. Configure CRUD operations, derived and custom queries, pagination, database auditing, and transaction management. Includes best practices for performance optimization and entity design."},"files":[{"bytes":6055,"path":"plugins/developer-kit-java/skills/spring-data-jpa/SKILL.md","sha256":"2bb11e952eb7ac060d6a7815706c19013b313975d55ca7f21976a368df7e7316","url":"https://skillfed.io/files/giuseppe-trisciuoglio/developer-kit/spring-data-jpa/8c9dd680/SKILL.md"}],"id":"giuseppe-trisciuoglio/developer-kit/spring-data-jpa","links":{"html":"https://skillfed.io/giuseppe-trisciuoglio/developer-kit/spring-data-jpa","md":"https://skillfed.io/giuseppe-trisciuoglio/developer-kit/spring-data-jpa.md","repo":"https://github.com/giuseppe-trisciuoglio/developer-kit"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":37,"language":"Python","last_updated":"2026-06-22","license":"MIT","name":"spring-data-jpa","publisher":"giuseppe-trisciuoglio","stars":311},"relations":{"similar":[{"id":"personamanagmentlayer/pcl/spring-boot-expert"},{"id":"decebals/claude-code-java/jpa-patterns"},{"id":"manutej/luxor-claude-marketplace/spring-boot-development"},{"id":"pluginagentmarketplace/custom-plugin-java/java-jpa-hibernate"},{"id":"xu-xiang/everything-claude-code-zh/jpa-patterns"},{"id":"dawiddutoit/custom-claude/java-spring-service"},{"id":"affaan-m/ECC/jpa-patterns"},{"id":"bobmatnyc/claude-mpm-skills/spring-boot"},{"id":"Kotlin/kotlin-agent-skills/kotlin-backend-jpa-entity-mapping"},{"id":"rohitg00/awesome-claude-code-toolkit/springboot-patterns"}]},"slug":{"owner":"giuseppe-trisciuoglio","repo":"developer-kit","skill":"spring-data-jpa"},"version":"8c9dd680"}
