Hibernate 6.2 strategy deprecated
Asked Answered
F

1

0

The hibernate 6.2 depreciated "strategy". In our current code base we are using

@GenericGenerator(
        name = "sequenceGenerator",
        strategy = "enhanced-sequence"
    )

However, I am unsure how to replace it with the new approach.

Fovea answered 12/3 at 8:47 Comment(0)
F
0

the enhanced-sequence correspanding class is SequenceStyleGenerator.class So it should be replace with type = SequenceStyleGenerator.class

@GenericGenerator(
        name = "sequenceGenerator",
        type = SequenceStyleGenerator.class
    )

https://github.com/manuelbernhardt/hibernate-core/blob/7e42b464442d0535d2d1dbb7dc501c8064825d54/hibernate-core/src/main/java/org/hibernate/id/factory/DefaultIdentifierGeneratorFactory.java#L82 enter image description here

Fovea answered 12/3 at 19:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.