Different representation of UUID in Java Hibernate and SQL Server

You need to specify the @Type(type = "uuid-char") in addition to @Column(name="...", columnDefinition = "uniqueidentifier"), see also Problems mapping UUID in JPA/hibernate .

Alternatively you can use a String field for the id in Java and still keep uniqueidentifier in SQL Server.

Leave a Comment