Persisting UUID in PostgreSQL using JPA

前端 未结 7 617
爱一瞬间的悲伤
爱一瞬间的悲伤 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

    0 讨论(0)
提交回复
热议问题