Add @Access(AccessType.FIELD) to Member to stop Hibernate mapping getMemberType() as a column

Fixkamo-shared-library
Ya
16 Aprili 2026, 03:53 UTC
Mwandishi
Kamo
Ahadi ya
59c2ade

The previous fix (@Transient on the memberType field) was insufficient. Hibernate 6 was still discovering the public getMemberType() method via property scanning (JavaBean getter convention) and mapping it to a persistent column named member_type. This produced a duplicate of the @DiscriminatorColumn, shifting security_level out of the members table projection and into member_team_member, causing the SQL error. @Access(AccessType.FIELD) explicitly forces field-only property discovery for the Member entity, so getMemberType() is invisible to the persistence engine regardless of its name.

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