When mapping multiple attributes in an Embeddable class to the same column, the Column insertable and updatable attributes are not considered, and a MappingException is raised stating that “Column X is duplicated in mapping for entity Y (use '@Column(insertable=false, updatable=false)' when mapping multiple properties to the same column)”. I am using Hibernate 6.1.7.Final. A test case was created within the attached pull request which is successful following the solution provided in the same pull request. Example:
Unexpected exception thrown: org.hibernate.MappingException: Column 'REGISTRATION_INDEX' is duplicated in mapping for entity 'org.hibernate.orm.test.mapping.Participant' (use '@Column(insertable=false, updatable=false)' when mapping multiple properties to the same column)
|