@IdClass(EntityId.class)
class Entity {
@Id
@GeneratedValue(strategy = GenerationType.Identity)
private Long id;
@Id
private LocalDate baseDt;
....
}
class EntityId {
private Long id;
private LocalDate baseDt;
}
with MySQL8
It should be added ‘auto increment’ to id, but it added to baseDt.
When I try to change baseDt’s type to Long and id’s field name to aId, then it work properly.
When debug it, baseDt column is treated as first column. How to fix it??