Problems mapping UUID in JPA/hibernate

Extending Mike Lively’s answer with a code sample & referring to Oracle too.

I had this problem with the OracleDialect (Oracle10gDialect). Adding an annotation @Type to the UUID field fixed it for me.

@Id
@Type(type="uuid-char")
private UUID id;

Note: also used a TwoWayStringBridge on this field, using the @FieldBridge annotation.

Note: type=”uuid-binary” did not work; got the same, unknown type error.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)