Hello,
I would like to know what is the syntax to create an entity (--class) with a primary key matching a specific sequence name.
Ex Table A as field A_PK and the PrimaryKey is given by the sequence A_SEQ.
Thank you,
Florian.
Hello,
I would like to know what is the syntax to create an entity (--class) with a primary key matching a specific sequence name.
Ex Table A as field A_PK and the PrimaryKey is given by the sequence A_SEQ.
Thank you,
Florian.
As far as I know there's no command to do it. I just create my entity and then I push-in the Id property
Code:@Id @SequenceGenerator(name = "gen", sequenceName = "A_SEQ") @GeneratedValue(generator = "gen") @Column(name = "A_PK") private Long id;