Switch MediaObjTransit to @MapsId derived-identity pattern

Fixkamo-shared-library
Ya
1 Mei 2026, 07:57 UTC
Mwandishi
Kamo
Ahadi ya
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.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei