Can anyone suggest how to fix the gap at the legacy system design?
-
The column is defined at the Java source code side as
@Column(name="ID") @Type(type="string") private UUID id;
-
The column datatype on the database side is defined as datatype VARCHAR(36)
Of course – we have an issue, because Hibernate can’t convert string to UUID automatically.
-
Databases’ changes are more comfortable as of now (cheaper) than Java source code.
Are there any ways how to avoid the issue with converting?
I’ve tried:
- change the database datatype to UUID; and
- set the value NULL to the column for all records (Hibernate has loaded a 0 records in this case).