Skip to content

Releases: framefork/typed-ids

v0.11.1

06 Feb 14:12
6f9fdb8

Choose a tag to compare

Bug Fixes

  • Fix UndeclaredThrowableException masking real exceptions during IDENTITY inserts — When using ObjectBigIntId-typed primary keys with GenerationType.IDENTITY, database exceptions such as ConstraintViolationException were being wrapped in UndeclaredThrowableException with a null message. This made debugging difficult and silently bypassed exception-specific catch blocks (e.g., Spring's DataIntegrityViolationException translation). The fix properly unwraps InvocationTargetException in all Hibernate modules (6.1, 6.2, 6.3). (#26, #27)

Internal / Build

  • Upgrade JReleaser from 1.20.0 to 1.22.0 and fix signing configuration deprecations
  • Pin JReleaser version in CI workflow from .sdkmanrc
  • Add Maven Central availability health check before release publishing
  • Upgrade base JDK from 17.0.16-tem to 17.0.17-tem

v0.11.0

14 Dec 15:16
5873932

Choose a tag to compare

New Features

  • Hibernate ORM 7.2 support (#25) — Added new typed-ids-hibernate-72 module providing full typed ID integration for Hibernate ORM 7.2.0.Final. Both ObjectBigIntId and ObjectUuid types are supported with automatic type registration, sequence-based ID generation, and proper JDBC type handling. The module adapts to Hibernate 7.2 API changes (such as the updated getJdbcType() signature and new getValue() on GeneratorCreationContext).

    To use it, add the following dependency:

    org.framefork:typed-ids-hibernate-72:0.11.0
    

Dependency Updates

  • Hibernate ORM 6.6: 6.6.36.Final → 6.6.38.Final
  • Hibernate ORM 7.1: 7.1.9.Final → 7.1.11.Final
  • Hypersistence Utils (hibernate-63, hibernate-70, hibernate-71): 3.12.0 → 3.13.3

Full Changelog: v0.10.0...v0.11.0

v0.10.0

22 Nov 16:41
d4eeaf5

Choose a tag to compare

New Features

  • Hibernate ORM 7.0 and 7.1 support (#12) — Added new typed-ids-hibernate-70 module providing seamless typed ID integration for Hibernate ORM 7.0 and 7.1. This is the module to use when upgrading to Spring Boot 4.x, which ships with Hibernate 7.

    • Full support for both ObjectBigIntId and ObjectUuid typed identifiers
    • All ID generation strategies: application-assigned, AUTO, IDENTITY, and SEQUENCE (including pooled-lo optimizer)
    • Entity inheritance hierarchies (single-table, joined, table-per-class)
    • Composite keys (@EmbeddedId and @IdClass)
    • Entity relationships (@OneToOne, @OneToMany, @ManyToOne)
    • Automatic type registration via TypeContributor and AdditionalMappingContributor SPI — no manual configuration needed
    • MySQL and PostgreSQL tested with dialect-aware UUID handling
  • Spring Boot 4.x compatibility (#24) — Added integration testing with Spring Boot 4.0 and Spring Data JPA using the new typed-ids-hibernate-70 module.

Known Issues

  • The ObjectBigIntId autogeneration support for Hibernate 7 does not fully support all configuration parameters for AUTO/IDENTITY/SEQUENCE strategies. If you are using default generation settings without customization, it should work correctly. Custom @GenericGenerator parameters (e.g., custom optimizer settings) may not be propagated correctly in all cases.

Migration Guide

If you are upgrading to Hibernate ORM 7.0 or 7.1 (e.g., via Spring Boot 4.x), replace your typed-ids-hibernate-63 dependency with typed-ids-hibernate-70:

// Before (Hibernate 6.3-6.6)
implementation("org.framefork:typed-ids-hibernate-63:0.10.0")

// After (Hibernate 7.0-7.1)
implementation("org.framefork:typed-ids-hibernate-70:0.10.0")

No code changes are required — the API and annotations remain the same.

Dependency Updates

  • Spring Boot (test): 3.4.10 → 3.5.8
  • Hibernate ORM 6.6: 6.6.31.Final → 6.6.36.Final
  • Hypersistence Utils: 3.11.0 → 3.12.0
  • java-uuid-generator: 5.1.0 → 5.1.1
  • springdoc-openapi: 2.8.8 → 2.8.14
  • Kotlin: 2.2.20 → 2.2.21

Full Changelog: v0.9.1...v0.10.0

v0.9.1

04 Oct 15:48
47931de

Choose a tag to compare

This is a testing and maintenance release. There are no changes to the library's runtime code or public API.

Testing

  • Added extensive Hibernate integration tests covering advanced scenarios: ID generation strategies (pooled-lo optimizer, IDENTITY, SEQUENCE), proxy/lazy-loading, batch loading via byMultipleIds(), native SQL parameter binding, composite keys (@EmbeddedId, @IdClass), inheritance hierarchies, and complex relationship mappings — across Hibernate 6.1, 6.2, and 6.3 (#20)
  • Added a testing-hibernate-native-alternatives module comparing typed-ids against native Hibernate approaches to document their limitations (#18, #16)
  • Introduced testFixtures for shared test entity classes, eliminating duplicated test entity definitions across modules (#20)

Dependency Updates

  • Hibernate ORM 6.2: 6.2.36.Final → 6.2.46.Final
  • Hibernate ORM 6.6: 6.6.12.Final → 6.6.31.Final
  • Hypersistence Utils (Hibernate 6.3): 3.9.9 → 3.11.0
  • MySQL Connector/J: 8.3.0 → 9.4.0
  • PostgreSQL Driver: 42.7.4 → 42.7.8
  • HikariCP: 4.0.3 → 5.1.0
  • Kotlin: 2.1.0 → 2.2.20

Build & CI

  • Upgraded Gradle Wrapper from 8.14 to 9.1.0 (#19)
  • Upgraded JReleaser to 1.20.0
  • CI now tests against JDK 25, replacing JDK 23 and 24 (#19)

Full Changelog: v0.9.0...v0.9.1

v0.9.0

10 Aug 14:25
bc977d5

Choose a tag to compare

New Features

  • OpenAPI schema support (#15, #17) — Added automatic OpenAPI schema generation for typed IDs, so that ObjectUuid-based IDs are mapped to string with format: uuid, and ObjectBigIntId-based IDs are mapped to integer with format: int64. Two new modules are available:
    • typed-ids-openapi-swagger-jakarta — Generic Swagger v3 Jakarta integration via TypedIdsModelConverter, auto-discovered through ServiceLoader. Supports both inline schemas and $ref-based schemas (configurable via TypedIdsModelConverter.idsAsRef or the framefork.typed-ids.openapi.as-ref system property).
    • typed-ids-openapi-springdoc — SpringDoc integration that registers the converter as a Spring bean with configuration via framefork.typed-ids.openapi.as-ref application property. Compatible with Spring Boot 3.0.x and newer.

Improvements

  • Generators.setFactory() is now publicObjectBigIntId.Generators.setFactory() and ObjectUuid.Generators.setFactory() are now public, allowing users to replace the default ID generator factory from outside the package.

Bug Fixes

  • Fix incorrect class name in ObjectBigIntIdJacksonModule — The internal serializers class was incorrectly named ObjectUuidSerializers instead of ObjectBigIntIdSerializers (copy-paste error; no functional impact, but fixed for clarity).

Documentation

  • Added a note about registering Jackson modules in Spring, since Spring's ObjectMapper ignores ServiceLoader-discovered modules by default.
  • Added documentation for Gson type adapter usage.
  • Added documentation for the new OpenAPI schema integration with a link to a working SpringDoc example.

Full Changelog: v0.8.0...v0.9.0

v0.8.0

03 May 10:37
c057764

Choose a tag to compare

Breaking Changes

  • Removed hypersistence-utils transitive dependency. The Hibernate modules (typed-ids-hibernate-61, typed-ids-hibernate-62, typed-ids-hibernate-63) no longer depend on io.hypersistence:hypersistence-utils-hibernate-*. A custom ImmutableType base class has been introduced as a drop-in replacement. If your project relied on hypersistence-utils being pulled in transitively through typed-ids, you will need to add it as a direct dependency.
  • Removed ObjectUuidArrayType (PostgreSQL UUID array column support). The Hibernate array type for mapping typed UUID arrays was removed, as it was broken and tightly coupled to hypersistence-utils. If you were using UUID array columns with typed IDs, this functionality is no longer available.

New Features

  • Gson serialization support. Added TypeAdapter and TypeAdapterFactory implementations for both ObjectUuid and ObjectBigIntId, enabling seamless serialization and deserialization with Gson. The factories are annotated with @AutoService(TypeAdapterFactory.class) for automatic SPI discovery, or can be registered manually:
    Gson gson = new GsonBuilder()
        .registerTypeAdapterFactory(new ObjectUuidTypeAdapterFactory())
        .registerTypeAdapterFactory(new ObjectBigIntIdTypeAdapterFactory())
        .create();

Build & CI

  • Upgraded Gradle to 8.14
  • Tests are now executed against JDK 17, 21, 23, and 24 using Gradle toolchains (JDK 22 was dropped)
  • Documented minimum supported Java version as 17 in README

Full Changelog: v0.7.0...v0.8.0

v0.7.0

18 Apr 16:23
385b4aa

Choose a tag to compare

Breaking Changes

  • Minimum Java version lowered from 21 to 17 — The library now targets Java 17, making it accessible to a wider range of projects. If you were relying on Java 21+ APIs through the library, please verify compatibility. (#8)
  • ObjectBigIntIdIdentifierGenerator renamed to ObjectBigIntIdSequenceStyleGenerator — If you were referencing ObjectBigIntIdIdentifierGenerator directly in your mappings, update the class name to ObjectBigIntIdSequenceStyleGenerator. The automatic remapping via MetadataContributor handles this transparently for standard @GeneratedValue annotations, so most users will not be affected.

New Features

  • Hibernate 6.1 support — Added the new typed-ids-hibernate-61 module, extending Hibernate ORM support to cover version 6.1 in addition to the existing 6.2 and 6.3+ modules. (#9)
  • ObjectBigIntId IDENTITY generation strategy — Added ObjectBigIntIdIdentityGenerator which enables ObjectBigIntId to work with database IDENTITY columns (auto-increment). Previously, only SEQUENCE-based generation was supported. This is automatically applied when using @GeneratedValue(strategy = GenerationType.IDENTITY) with an ObjectBigIntId primary key, across all supported Hibernate versions (6.1, 6.2, 6.3+).

Documentation

  • Added Java and Kotlin usage examples for ObjectBigIntId to the README, matching the existing ObjectUuid documentation.

Full Changelog: v0.6.1...v0.7.0

v0.6.1

14 Apr 15:23
e788c21

Choose a tag to compare

Changelog

e788c21 set kotlin-stdlib dependency as optional
6bfb58c typo
85519d5 chore: bump version to 0.6.1-SNAPSHOT

v0.6.0

13 Apr 18:09
b635735

Choose a tag to compare

Changelog

b635735 basic support for Kotlin Serialization
1365a87 add ours typed-ids-index-java-classes-processor module
e62eb14 Jackson (de)serialization support [Closes #2]
757b72b add TypedIdsRegistry
352e4d1 actions: upgrade action-download-artifact
23b1571 actions: make sure the CI env JDK is used for java tasks by gradle
c5b4885 set newer jreleaser to .sdkmanrc
1fbef93 remove unused gradle plugin
2471a92 upgrade gradle to 8.13
c75aeee fix jreleaser.yml compatibility
8731dcc chore: bump version to 0.5.1-SNAPSHOT

v0.5.0

05 Apr 18:20
b170611

Choose a tag to compare

Changelog

a9698e1 bump hibernate dependencies
24e0dba add LazyValue for better initialization semantics around Generator Factories
24d5cc8 mark util classes as internal
52a61ae ObjectUuid: remove useless methods
9217647 add BigInt object ids support
ac510aa add missing nullability annotations
2eb6580 refactor tests
cfe4008 refactor ServiceLoaderUtils
74e1156 UuidGenerator refactoring
199f139 the fasterxml uuid generator is an optional dependency
bf4ea36 refactor ObjectUuidTypeUtils
9cf96af shorten standard boilerplate
8a7ab06 set java compatibility of buildSrc to 21
22dbf86 buildSrc: set jvm target to 21
373fd1d actions: overwrite test results (last one wins)
1e26436 actions: upgrade 3rd-party actions
6a2d492 actions: upgrade 3rd-party actions
eec4ed1 chore: bump version to 0.4.1-SNAPSHOT