Persisting UUID in PostgreSQL using JPA

前端 未结 7 632
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 06:43

I\'m trying to persist an entity in PostgreSQL that uses UUID as primary key. I\'ve tried persisting it as a plain UUID:

@Id
@Column(name = \"customer_id\")
         


        
7条回答
  •  时光说笑
    2020-12-01 07:13

    Adds this flag on postgresql url connection: ?stringtype=unspecified

    like that

    jdbc:postgresql://localhost:5432/yourdatabase?stringtype=unspecified

提交回复
热议问题