1.UUID主键生成策略 

 

jpa标准方式下,不可以生成uuid类型的主键,但是hibernate提供了一些方式生成uuid主键,具体方式,
1,通过注解方式生成一个generator
     @GenericGenerator(name="idGenerator", strategy="uuid")
2.主键生成器
     @GeneratedValue(generator="idGenerator")

相关文章:

  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-11-22
猜你喜欢
  • 2022-12-23
  • 2021-08-21
  • 2022-01-29
  • 2021-10-26
  • 2022-01-01
  • 2021-04-15
相关资源
相似解决方案