Constructore Generator Issue - @GeneratedValue
已回答
Hi All,
I shift recently to IntelliJIDEA from STS.
I tried to generate the constructor using the default code generator, but it seems the field which annotated by :
@GeneratedValue(strategy = GenerationType.IDENTITY)
would get bypassed by the code generator and cant generate the constructore for it!
请先登录再写评论。
Hi.
Please provide exact steps to reproduce a problem.
I can not use Alt+Insert -> Constructor to create a constructor for below class:
public class BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
something like:
public BaseEntity(Long id) {this.id = id;
}
or even someting like:
the id field wont be suggested as it get annotated by
Try Code | Generate | Constructor,