Migrate ULIDIdGenerator to Hibernate ORM 7 (0.3.0-hu) - #3
Merged
Conversation
ULIDIdGenerator.generate() called EntityPersister#getClassMetadata(), removed in Hibernate 7, throwing NoSuchMethodError on every generated insert. Port to the H7 APIs: - configure(GeneratorCreationContext, Properties) replaces the removed configure(Type, Properties, ServiceRegistry) signature - generate() uses persister.getIdentifier(object, session) directly Also: - Bump to 0.3.0-hu; hibernate-core org.hibernate.orm:7.2.19.Final as provided scope so consumers bring their own Hibernate; Java 17 - Add Hibernate 7 + H2 integration tests covering all four id types (ULID/UUID/String/byte[]) and the existing-id branch - Fix ci.yml (temurin 17, pure Maven); delete stale Gradle release.yml - README: Humand fork section with new coordinates and H7 requirement Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ULIDIdGenerator.generate()calledEntityPersister#getClassMetadata(), which Hibernate ORM 7 removed — every generated insert on an H7 consumer (e.g. marty) throwsNoSuchMethodError. This ports the generator to the H7 APIs: the newconfigure(GeneratorCreationContext, Properties)signature andpersister.getIdentifier(object, session)directly.0.3.0-hu(breaking: requires Hibernate 7; H6 users stay on0.2.1-hu), moveshibernate-coretoorg.hibernate.orm:7.2.19.Finalinprovidedscope so consumers bring their own Hibernate, and raises Java to 17 (H7 baseline).ci.yml(temurin 17, pure Mavenverify, gradle leftovers removed), deletes the stale upstream Gradle/Sonatyperelease.yml, and documents the fork in the README.Test plan
./mvnw clean verify— 287 tests pass, including 5 new Hibernate 7 integration tests against in-memory H2./mvnw dependency:tree— hibernate-core isprovided, no compile-scope Hibernate leaks to consumers./mvnw clean deployto CodeArtifact, then point marty's@GenericGeneratorback atio.github.jaspeen.ulid.hibernate.ULIDIdGeneratorand delete its in-repo copy🤖 Generated with Claude Code