Closed simasch closed 1 year ago
Is there really any case when this is a performance problem? It could be an integer instead, with somewhat less security as you can guess the previous and next id
JPA 3.1 seems to have @GeneratedValue(strategy = GenerationType.UUID)
Sequence is the most common way. UUID generation is slow on mass inserts. Also depending on the database used UUIDs are stored differtly. IMO we should use what the most common strategy is.
Isn't it the case that UUID is more favorable security-wise?
Not really because for performance improvement databases generate serial UUIDs
Ids are now Long and use sequence based generation, which seems what most people recommend
The uuid-char ID generator is a Hibernate proprietary feature. Plus a UUID may not be the best strategy performance-wise.
You should consider using only JPA standard features.