Resolve security_level SQL error caused by duplicate MEMBER_TYPE column in Hibernate 6

Fixkamo-shared-library
Ya
16 Aprili 2026, 03:22 UTC
Mwandishi
Kamo
Ahadi ya
f81e6ed

Member.java mapped MEMBER_TYPE both as @DiscriminatorColumn and as an explicit @Column field. Hibernate 6 selected the column twice in the parent table projection, causing a column-count drift that pushed security_level into the child table (member_team_member) SELECT — where it does not exist. Fix: remove the @Column JPA mapping from memberType and derive it at runtime via instanceof in a custom getMemberType() getter. MemberRepository's JPQL query is updated to use TYPE(m) for discriminator-based filtering, with a default bridge method preserving the existing API signature for all callers.

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