KamoCRM

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

Fixkamo-shared-library
Shipped
16 ஏப்ரல், 2026 அன்று 3:53 AM UTC
Author
Kamo
Commit
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.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing