Hello, the following Mapping was legal in Hibernate 4 and 5 (for 10 years or more). It’s a readonly (@Immutable) Metamodel class. In 6.2. I’m getting a MappingException “mandant”-column is duplicated. Note, the column is both ID and Discriminator. Addition of insertable=false, updatable=false doesnt cure. Any suggestions?
@Entity
@Immutable
@Table(name = "ecm_meta.t_mandanten")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "mandant", discriminatorType = DiscriminatorType.INTEGER)
@DiscriminatorOptions(force = false, insert = false)
public abstract class Mandant implements Serializable {
private static final long serialVersionUID = 7098735388830268631L;
@Id
@Column(name = "mandant")
private Integer mandant;
// other omitted
}