hibernate-upgrade

Migrate Hibernate 5 to Hibernate 6 in Spring Boot 3 projects.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill hibernate-upgrade
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hibernate-upgrade
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/spring-boot-jakarta-migration/environment/skills/hibernate-upgrade
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill hibernate-upgrade

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate Hibernate 5 to Hibernate 6 within Spring Boot 3 projects to resolve breaking changes, deprecated APIs, and compatibility issues during upgrades.

Core Features & Use Cases

  • Update package namespace from javax.persistence to jakarta.persistence across entities and configuration.
  • Adjust ID generation strategies and default behaviors to align with Hibernate 6.
  • Update query syntax and mappings (JPQL, HQL, and native queries) and address N+1 issues and performance considerations.
  • Troubleshoot migrations with tests, configuration adjustments, and verification of entity mappings.

Quick Start

Follow the migration guidance to upgrade a Spring Boot 3 project from Hibernate 5 to Hibernate 6 by updating dependencies, code, and configuration.

Frequently Asked Questions about hibernate-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Hibernate 5 to 6 in a Spring Boot 3 project?

Migrating Hibernate 5 to 6 in Spring Boot 3 requires updating dependencies, shifting from javax.persistence to jakarta.persistence namespaces, adjusting ID generation, and updating dialect configuration and JPQL queries.

Why does my Hibernate 6 upgrade break javax.persistence imports?

Your Hibernate 6 upgrade breaks javax.persistence imports because the framework migrated to the jakarta.persistence namespace. You must update entity and configuration package declarations to resolve these breaking changes.

Does Spring Boot 3 require upgrading to Hibernate 6?

Yes, Spring Boot 3 requires upgrading to Hibernate 6 for compatibility. The framework migration necessitates resolving deprecated APIs, adjusting ID generation strategies, and updating query syntax to ensure smooth operation.

How do I fix JPQL and native query syntax errors after upgrading to Hibernate 6?

To fix JPQL and native query syntax errors after upgrading to Hibernate 6, update query mappings and syntax to align with Hibernate 6 standards, while addressing potential N+1 issues and monitoring performance impacts.

What is the best way to test a Hibernate 5 to 6 migration?

The best way to test a Hibernate 5 to 6 migration is troubleshooting with tests, configuration adjustments, and verifying entity mappings to ensure breaking changes and deprecated APIs are resolved and validated.