All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eap8.eap7.hibernate6.windup.xml Maven / Gradle / Ivy

The newest version!



    
        
            This ruleset provides migration rules to Hibernate ORM 6.
        
        
            
            
        
        
        
        
        hibernate
    

    
        
            
                
                    ANNOTATION
                
            
            
                
                    
                        The way in which Hibernate determines implicit names for sequences and tables associated with identifier generation has changed in 6.0 which may affect migrating applications.  
                        As of 6.0, Hibernate by default creates a sequence per entity hierarchy instead of a single sequence hibernate_sequence.  
                        Due to this change, users that previously used `@GeneratedValue(strategy = GenerationStrategy.AUTO)` or simply `@GeneratedValue` (since `AUTO` is the default), need to ensure that the database now contains sequences for every entity, named `<entity name>_seq`. For an entity Person, a sequence person_seq is expected to exist.  
                        It’s best to run hbm2ddl (e.g. by temporarily setting `hbm2ddl.auto=create`) to obtain a list of DDL statements for the sequences.
                    
                    
                
            
        
        
            
                
            
            
                
                    
                        As part of the Hibernate ORM 6.0 release, mapping annotations have been modernised and made more type-safe. These annotations must be removed. See the User Guide for details about mapping your domain model.
                    
                    
                    
                
            
            
                
             
        
        
            
                
                    ANNOTATION
                    
                
            
            
                
                    
                        As part of the Hibernate ORM 6.0 release, mapping annotations have been modernised and made more type-safe. Annotation attributes accepting types as String have been removed. See the User Guide for details about mapping your domain model.
                    
                    
                    
                
            
            
                
            
        
        
            
                
                    IMPLEMENTS_TYPE
                
            
            
                
                    Basic mappings are no longer configurable through the BasicType contract. Instead, users configure the different aspects of mapping the basic value to the database. See migration guide for more details.
                    
                
            
        
        
            
                
            
            
                
                    The `StandardBasicTypes` class previously exposed `BasicType` instance fields, which now have been replaced with fields of the type `BasicTypeReference`.
                    
                
            
        
        
            
                
            
            
                
                    The interface `org.hibernate.type.descriptor.java.JavaTypeDescriptor` must be renamed to `org.hibernate.type.descriptor.java.JavaType`.
                    
                
            
        
        
            
                
            
            
                
                    The interface `org.hibernate.type.descriptor.sql.SqlTypeDescriptor` has been renamed to `org.hibernate.type.descriptor.jdbc.JdbcType`.
                    
                
            
        
        
            
                
            
            
                
                    The CompositeUserType interface was re-implemented to be able to model user types as proper embeddable types. See the migration guide for more information.
                    
                
            
        
        
            
                
            
            
                
                    The configuration property `hibernate.hql.bulk_id_strategy` was changed to `hibernate.query.mutation_strategy` which now refers to classes or objects implementing `org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy`.
                    
                
            
            
                
            
        
        
            
                
                    
                        METHOD_CALL
                    
                    
                        METHOD_CALL
                    
                
            
            
                
                    
                        `jakarta.persistence.Query#getResultStream()` and `org.hibernate.query.Query#stream()` no longer return a Stream decorator. In order to close the underlying IO resources, it is now necessary to explicitly call the `Stream#close()` method.
                        This change makes the Streams returned by Hibernate behave as defined in the JDK Stream documentation, which is quite explicit about the need for an explicit call to close by the user to avoid resource leakages.
                    
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    The signature of the `Interceptor#onSave` method has been changed to account for the general change in expected identifier type from `Serializable` to `Object`. See migration guide for more information.
                    
                
            
        
        
            
                
                    IMPORT
                
            
            
                
                    The contents of the `loader.collection` package were restructured into `loader.ast.spi` and `loader.ast.internal` as well as adapted to the SQM API.
                    
                
            
        
        
            
                
                    IMPORT
                
            
            
                
                    The contents of the `loader.custom` package were adapted and moved to `query.sql`.
                    
                
            
        
        
            
                
                    
                        IMPORT
                    
                    
                        IMPORT
                    
                
            
            
                
                    The contents of `loader.entity` and `loader.plan` were removed
                    
                
            
        
        
            
                
                    IMPORT
                
            
            
                
                    The contents of `sql.ordering` were adapted and moved to `metamodel.mapping.ordering.ast`.
                    
                
            
        
        
            
                
            
            
                
                    Classes of the sql package that were previously used for building SQL, but aren’t needed anymore, were removed. The SQL generation is now fully handled through the `SqlAstTranslator` which a `Dialect` exposes a factory for.
                    
                
            
            
                
            
        
        
            
                
                    
                
            
            
                
                    In Hibernate 6.0 the support for basic property mappings with multiple columns was removed. The only use case for that was when a `CompositeUserType` was in use, which was reworked to now work on top of components.
                    
                
            
        
        
            
                
                    IMPORT
                
            
            
                
                    The legacy Hibernate Criteria API which was deprecated back in Hibernate 5.x and removed in 6.0. Usually, all queries using the legacy API can be modeled with the JPA Criteria API. In some cases it is necessary to use the Hibernate JPA Criteria extensions.
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    The Query#iterate() method has been removed. See link for alternatives.
                    
                
            
        
        
            
                
                    
                        ANNOTATION
                        
                    
                    
                        
                    
                
            
            
                
                    Using `NativeQuery` to call SQL functions and procedures is no longer supported. `org.hibernate.procedure.ProcedureCall` or `jakarta.persistence.StoredProcedureQuery` should be used instead. `@NamedNativeQuery` references defining execution of procedure or functions should be migrated to use `@NamedStoredProcedureQuery` instead.
                    
                
            
        
        
            
                
                
            
            
                
                    The fetch all properties clause was removed from the HQL language without a replacement. See link for replacement info.
                    
                
            
        
        
            
                
            
            
                
                    Hibernate no longer provides built-in support for integrating itself with JMX environments.
                    
                
            
        
        
            
                
            
            
                
                    Hibernate no longer provides built-in support for integrating itself with JACC environments.
                    
                
            
        
        
            
                
            
            
                
                    These properties are deprecated: use `hibernate.classLoaders` instead.
                    
                
            
            
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: use `jakarta.persistence.create-database-schemas` or `hibernate.hbm2ddl.create_namespaces` instead
                    
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.jpa.metamodel.population` instead
                    
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.cfg_xml_file` instead
                    
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.orm_xml_files` instead
                    
                
            
            
                
            
        
        
            
               
            
            
                
                    This property has been removed: please use `hibernate.hbm_xml_files` instead
                    
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.loaded_classes` instead
                    
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.{property}` instead
                    
                
            
            
                
            
            
                
            
        
        
            
                
            
            
                
                    This property has been removed: please use `hibernate.session_factory_name` instead
                    
                
            
            
                
            
        
        
            
                
                    
                    
                
            
            
                
                    
                        As of Hibernate 6.0, some dialect classes that are maintained by vendors or individuals, as opposed to the Hibernate team, have been moved to a separate Maven artifact: `org.hibernate.orm:hibernate-community-dialects`.

                        Note that the new artifact is not included in the EAP 8 distribution and will have to be added manually.
                    
                    
                
            
            
                
            
        
        
            
                
                    
                    
                    
                    
                
            
            
                
                    
                        Multitenancy in Hibernate ORM has been simplified. Hibernate will now infer whether multitenancy is enabled or not automatically.
                        - If a MultiTenantConnectionProvider is configured, Hibernate ORM will assume either database- or schema-based multitenancy (there is no difference between those two as far as Hibernate ORM is concerned).
                        - If an entity property is annotated with the new @TenantId annotation, Hibernate ORM will assume discriminator-based multitenancy (which is a new feature).
                        
                        See links for information on how to migrate.
                    
                    
                
            
            
                
            
        
    




© 2015 - 2025 Weber Informatics LLC | Privacy Policy