Switch MediaObjTransit to @MapsId derived-identity pattern

Fixkamo-shared-library
Shipped
May 1, 2026 at 7:57 AM UTC
Author
Kamo
Commit
fc5ee35

@IdClass combined with @Id @OneToOne is not reliably supported in Hibernate 6 — JpaRepository<MediaObjTransit, UUID> initialization fails with "does not define an IdClass" even when the annotation is present. The canonical JPA pattern for derived identity is @MapsId: a basic @Id UUID field plus a @MapsId @OneToOne to the parent, sharing the same FK column. Hibernate populates the id automatically from obj.id on persist, callers don't need to set it, and Spring Data exposes it as a singular UUID @Id with no metamodel fuss. DB schema is unchanged (single OBJ_ID column). Also removes MediaObjTransitId, no longer needed.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing