Hello guyz,
I'm working on the development of a huge project, and all my entity classes will use the same ID generator. All entity classes extends a MappedSuperclass, where the id is declared.
I'm opening here a discussion on advantages and disadvantages of uuid, sequence and sequencehilo generators.
We're using Oracle.
Currently all our entities implement a superclass, and this superclass is defines an uuid of size 32. There is no id repetition per table, each id generated for all entities is different.
We are considering changing it to sequence generator, and i have some doubts:
- If i declare a sequence generator in a superclass that will be used by ALL entities (and there's a lot) will the sequence be unique for all entities or each subclass will have its own sequence? Or will i need to declare one sequence id per each entity?
- SequenceHiLo generator has a better performance than sequence generator. Is there a known drawback? An idea of the number of rows to make this performance gain noticeable?
Well, thanks a lot for any help,
Chico Science
|