I have used the below code to create an UUID datatype column in JPA entity that similar to the column in PostgreSQL DB
Entity
@Column(name = "uid", updatable = false, nullable = false)
private UUID uid = UUID.randomUUID();
Table Column
uid uuid NOT NULL DEFAULT uuid_generate_v1() in PostgreSQL DB
When i tried to insert a new record the error show as
"Request processing failed; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement" and "org.postgresql.util.PSQLException: ERROR: column "uid" is of type uuid but expression is of type bytea"
How to convert the bytea uuid value to correspondent in DB?