I'm using binary format to store UUIDs in mysql database ( binnary(16) )
and I'm useing the following code in hibernate
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
@Column( columnDefinition = "BINARY(16)", length = 16 )
private UUID id;
those generated values look different and seems as garbage values when I view in phpmyadmin
if I use UUID() function in mysql query it seems fine.
Then how to tell hibernate to use UUID() function