Closed bbzurek closed 1 year ago
Since we are using new Hibernate version should we also "improve" the entities? The strategy
is deprecated from Hibernate 6.2 and instead we replace with type
:
strategy = "enhanced-sequence
to
type = SequenceStyleGenerator.class
@GenericGenerator(
name = "sequenceGenerator",
type = SequenceStyleGenerator.class,
parameters = {
@org.hibernate.annotations.Parameter(
name = "optimizer",
value = "pooled-lo"
),
@org.hibernate.annotations.Parameter(
name = "initial_value",
value = "1"
),
@org.hibernate.annotations.Parameter(
name = "increment_size",
value = "5"
),
@org.hibernate.annotations.Parameter(
name = "sequence_name",
value = "hibernate_sequence"
)
}
)
Note: This for all entities.