I am storing UUIDs as a primary key.
@GeneratedValue(generator = "UUID_GENERATOR")
@GenericGenerator(name = "UUID_GENERATOR", strategy = "uuid2")
@Column(name = "store_id")
private UUID storeId;
The problem with this is in sql_server the UUIDs are storing a different order compared to what I got from the JSON output.
JSON output
"storeId": "3854fe95-e6b6-4319-9d9a-bfe67c9a07d6",
Database
storeID: "95FE5438-B6E6-1943-9D9A-BFE67C9A07D6"
The initial 8-4-4 digits are storing in a different order whereas last 4-12 digits are same. What is the reason for this issue and how to solve this?