You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
#278
Open
fredysierra opened this issue
Nov 2, 2023
· 0 comments
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"
)
}
)
https://github.com/Backbase/golden-sample-services/blob/main/services/product/src/main/java/com/backbase/goldensample/product/persistence/ProductEntity.java#L40
https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/annotations/GenericGenerator.html#strategy()
Note: This for all entities.
Originally posted by @eacarvalho in #260 (comment)
The text was updated successfully, but these errors were encountered: