-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
for: team-attentionAn issue we need to discuss as a team to make progressAn issue we need to discuss as a team to make progressstatus: feedback-providedFeedback has been providedFeedback has been providedstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
When there's an entity which has more than one field with the same name, but they are in different embeddable classes, example:
@Entity
@Getter
@Setter
@ToString
public class Example {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Personal personal;
private Business business;
@Embeddable
@Getter
@Setter
@ToString
public static class Personal {
private String address;
}
@Embeddable
@Getter
@Setter
@ToString
public static class Business {
private String address;
}
}the task processAot fails with this error:
Caused by: org.hibernate.MappingException: Column 'address' is duplicated in mapping for entity 'com.example.Example' (use '@Column(insertable=false, updatable=false)' when mapping multiple properties to the same column)
However, this should not happen since
spring.jpa.hibernate.naming.implicit-strategy is set to org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl
Metadata
Metadata
Assignees
Labels
for: team-attentionAn issue we need to discuss as a team to make progressAn issue we need to discuss as a team to make progressstatus: feedback-providedFeedback has been providedFeedback has been providedstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged