If we have a
UUID that is not the @Id we
then Ebean will assign a appropriate UUID generator to it.
/** The Id property using DB Identity or Sequence */ @Id @GeneratedValue private long id; /** Alternate unique UUID property */ @GeneratedValue @Column(unique = true) private UUID uid;
UUID has native support in the following database platforms:
- SQL Server 17
When using these database platforms UUID is stored in a native manor.
Stored as BINARY(16), has the option of storing in optimised manor meaning the order of bytes is changed to provide a better distribution in index.
Stored as VARCHAR(40).
When the database platform does not support UUID natively we can configure the
storage option via