Manually specify the value of a primary key in JPA @GeneratedValue column

后端 未结 6 1146
眼角桃花
眼角桃花 2020-12-29 02:42

I\'m having an Entity which has a primary key / id field like the following:

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
         


        
6条回答
  •  星月不相逢
    2020-12-29 03:20

    Look for Custom Id Generator

    http://blog.anorakgirl.co.uk/2009/01/custom-hibernate-sequence-generator-for-id-field/

    maybe this could help.

提交回复
热议问题