Backbase / golden-sample-services

This project is a development of a small set of [Backbase Service SDK](https://community.backbase.com/documentation/ServiceSDK/latest/index), Spring Boot and Spring Cloud based Microservices projects that implement microservices design patterns, cloud-native recommendations, and coding best practices.
42 stars 20 forks source link

SSDK version update - 16.0.1 #260

Closed bbzurek closed 1 year ago

bbzurek commented 1 year ago
eacarvalho commented 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"
            )
        }
    )

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.