I use varbinary(36) to save UUID in MySql as primary keys. And I use EclipseLink to auto gen my data objects. It gens primary key as String. I inserted data as below. When I use JPA to select * from country, the COUNTRY_ID becames: '66653565373765302D663832312D313165332D613361632D303830303230306339613636'. What am I doing wrong?
INSERT INTO `didicity`.`country`
(`COUNTRY_ID`, `NAME`, `SHORT_NAME`)
VALUES
('fe5e77e0-f821-11e3-a3ac-0800200c9a66',
'United State',
'USA'
);
@Id
@Column(name = "COUNTRY_ID")
private String countryId;