Skip to content

chore: update Spring Boot 3.5.9, Hibernate 6.6.5#3413

Draft
JanCizmar wants to merge 7 commits intomainfrom
jancizmar/update-spring-boot-hibernate
Draft

chore: update Spring Boot 3.5.9, Hibernate 6.6.5#3413
JanCizmar wants to merge 7 commits intomainfrom
jancizmar/update-spring-boot-hibernate

Conversation

@JanCizmar
Copy link
Contributor

@JanCizmar JanCizmar commented Jan 24, 2026

Summary

  • Update Spring Boot: 3.4.9 → 3.5.9
  • Update Hibernate ORM: 6.5.3.Final → 6.6.5.Final
  • Update Hypersistence Utils: 3.10.1 → 3.14.1

Breaking Change Fix

Renamed ImportFile.importImportFile.importData to avoid Java reserved keyword conflict with Hibernate 6.6's stricter annotation processor.

Test plan

  • Compilation passes (main + test sources)
  • PublicControllerTest passes (Spring context loads)
  • ImportFileRepositoryTest passes (field rename works)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added development guidelines with branch naming conventions.
  • Chores

    • Updated Spring Boot to version 3.5.9.
    • Updated Hibernate to version 6.6.5.Final.
    • Updated Hibernate types library dependency to 3.14.1.

✏️ Tip: You can customize this high-level summary in your review settings.

… 3.14.1

- Spring Boot: 3.4.9 → 3.5.9
- Hibernate ORM: 6.5.3.Final → 6.6.5.Final
- Hypersistence Utils: 3.10.1 → 3.14.1

Breaking change fix: Renamed ImportFile.import to ImportFile.importData
to avoid Java reserved keyword conflict with Hibernate 6.6's stricter
compile-time annotation processor.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JanCizmar JanCizmar marked this pull request as draft January 24, 2026 11:27
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

A comprehensive refactoring that renames the import field to importData in the ImportFile data model and updates all corresponding JPA mappings, repository queries, service implementations, and tests. Additionally, Spring Boot, Hibernate, and Hibernate types library versions are incremented.

Changes

Cohort / File(s) Summary
Project Guidelines
CLAUDE.md
Added branch naming convention documentation specifying format username/description with example branch names.
Data Model & ORM Configuration
backend/data/src/main/kotlin/io/tolgee/model/dataImport/ImportFile.kt, backend/data/src/main/kotlin/io/tolgee/model/dataImport/Import.kt
Renamed field import to importData in ImportFile entity; added @JoinColumn(name = "import_id") annotation. Updated corresponding OneToMany mappedBy reference in Import from "import" to "importData".
Data Access Layer
backend/data/src/main/kotlin/io/tolgee/repository/dataImport/ImportFileRepository.kt, backend/data/src/main/kotlin/io/tolgee/repository/dataImport/ImportLanguageRepository.kt, backend/data/src/main/kotlin/io/tolgee/repository/dataImport/ImportRepository.kt, backend/data/src/main/kotlin/io/tolgee/repository/dataImport/ImportTranslationRepository.kt
Updated JPQL query paths throughout all repository methods to navigate via importData instead of import for accessing related Import entity properties.
Service & Controller Layer
backend/data/src/main/kotlin/io/tolgee/service/dataImport/ImportService.kt, backend/data/src/main/kotlin/io/tolgee/service/key/KeyMetaService.kt, backend/api/src/main/kotlin/io/tolgee/api/v2/controllers/dataImport/V2ImportLanguagesController.kt
Updated all field references and query conditions from file.import and import path navigation to file.importData and importData respectively.
Tests
backend/app/src/test/kotlin/io/tolgee/repository/dataImport/ImportFileRepositoryTest.kt
Updated test constructor calls and assertions to use importData parameter and property instead of import.
Dependency Updates
gradle.properties, settings.gradle
Bumped Spring Boot from 3.4.9 to 3.5.9, Hibernate from 6.5.3.Final to 6.6.5.Final, and Hibernate types library from 3.10.1 to 3.14.1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • Anty0

Poem

🐰 A field once called "import" takes its new name,
Through repositories and services, the refactor's the same,
From data to queries, each reference aligned,
ImportData now flows through code, cleanly refined,
While versions spring forth like fresh carrots to munch! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: updating Spring Boot and Hibernate versions, which is the primary focus of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

JanCizmar and others added 6 commits January 24, 2026 13:01
Refactor entity migration to detach the legacy user before reassigning
entities. This prevents Hibernate 6.6's stricter orphanRemoval from
deleting entities that are being transferred to a new owner.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clear UserAccount.preferences reference after removing the entity
  to avoid validation error during auto-flush

- Synchronize bidirectional relationship in TestDataService when
  saving UserPreferences to ensure the UserAccount references
  the managed entity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add deleteAllByKeyIdIn and deleteAllByKeyProjectId to TaskKeyRepository
  to explicitly delete TaskKey entries before deleting Keys
- Flush and clear the persistence context after deleting related entities
  (translations, metas, screenshots, task keys) to prevent Hibernate 6.6's
  stricter CHECK_ON_FLUSH from seeing stale relationships with orphanRemoval
- Re-fetch keys after clearing context to ensure clean state before deletion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Hibernate 6.6 introduced stricter validation during flush that checks
all managed entities have consistent relationships. This caused
TransientObjectException when deleting projects because:

1. Entity-based deletion (repository.deleteAll) marks entities as
   "removed" but other entities in the session still reference them
2. On flush, Hibernate 6.6 sees these stale references and throws

Fixes:
- ProjectHardDeletingService: Add flush/clear before and after batch job
  deletion, and use bulk JPQL DELETE for project and related entities
  (Automation, ContentDeliveryConfig, ContentStorage, WebhookConfig, etc.)
- BatchJobService: Rewrite deleteAllByProjectId to use bulk JPQL queries
  with project.id filtering instead of loading entities into memory.
  This also handles the case of millions of batch jobs per project.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Spring Boot 3.5.x changed relaxed binding precedence for environment
variables. Using uppercase SPRING_PROFILES_ACTIVE ensures proper
profile activation regardless of Dockerfile settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Hibernate 6 is stricter about nullability in Spring Data projections.
The repository query uses LEFT JOIN for translations, which returns
null when a key has no base translation. The interface must declare
the field as nullable to match the actual query results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant