Remove memberType field entirely to prevent Hibernate duplicate column

Fixkamo-shared-library
Shipped
April 16, 2026 at 5:29 AM UTC
Author
Kamo
Commit
283eb0e

The previous fixes (@Transient on field, @Access(AccessType.FIELD) on class) were insufficient. Bytecode inspection revealed Lombok's @Setter generated a public setMemberType() method. Paired with the manual getMemberType() getter, Hibernate 6 treated memberType as a full persistent property (getter+setter pair), mapping it to column member_type — duplicating the @DiscriminatorColumn and pushing security_level into the member_team_member projection. Removing the field entirely eliminates the Lombok-generated setter. Only the @Transient getMemberType() computation method remains.

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