Can you give us a recommendation as we can represent the Key (UUID) most efficient?
Both in terms of memory usage of the database files, memory usage of the JVM and efficiency for queries.
We already need the key before the entities are persisted so that we can build even references.
a) Composite Primary Key with two Longs
b) Embedded Primary Key with two Longs
c) Furthermore, as String (but reduced to a 22 char instead of actual 36 char)
- Would it bring someting to specify the length with the Column annotation?
d) Or would you recommend something else?
Finally, how much performance improvement would bring a switch to a single long?