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

eap7.eap71.hibernate51-53.windup.xml Maven / Gradle / Ivy

The newest version!


    
        
            This ruleset provides analysis of applications that use Hibernate 5.1 and may require
            individual attention when migrating to Hibernate 5.3.
        
        
            
            
        
        
        
        
        hibernate
    
    
        
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionImplementor` parameter has to be changed to `org.hibernate.engine.spi.SharedSessionContractImplementor`.
                    
                    hibernate
                
            
            
                
            
        
        
        
            
                
                    
                
                
                    
                        
                    
                
            
            
                
                    change reference to hibernate-java8 to hibernate-core (since hibernate-java8 has been merged into hibernate-core module) 
                    
                    hibernate
                
            
            
                
            
        
        
        
            
                
                    IMPORT
                
            
            
                
                     If the `SessionFactory` is built via Hibernate’s native bootstrapping and `org.hibernate.HibernateException` or a subclass is referenced by the application
                        then set `hibernate.native_exception_handling_51_compliance` configuration property to `true`.
                    
                    hibernate
                
            
            
                
            
        
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getDefaultQueryResultsCache()` should be used instead of `SessionFactoryImplementor.getQueryCache()` method.
                    
                    hibernate
                    
                        getCache().getDefaultQueryResultsCache()
                        getQueryCache()
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getDefaultQueryResultsCache(String regionName)` should be used instead of `SessionFactoryImplementor.getQueryCache(String regionName)` method.
                    
                    hibernate
                    
                        getCache().getQueryResultsCache(
                        getQueryCache(
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getTimestampsCache()` should be used instead of `SessionFactoryImplementor.getUpdateTimestampsCache()` method.
                    
                    hibernate
                    
                        getCache().getTimestampsCache()
                        getUpdateTimestampsCache()
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getRegion(String regionName)` should be used instead of `SessionFactoryImplementor.getSecondLevelCacheRegion(String regionName)` method.
                    
                    hibernate
                    
                        getCache().getRegion(
                        getSecondLevelCacheRegion(
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    
                        Depending on the type of region, the appropriate method should be used instead:  

                        * For an entity cache region, `org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel().entityPersister( entityName ).getCacheAccessStrategy()` should be used instead
                        * For a collection region, `org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel().collectionPersister( role ).getCacheAccessStrategy()` should be used instead
                        * For a natural ID region, `org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel().entityPersister( entityName ).getNaturalIdCacheAccessStrategy()` should be used instead
                    
                    
                    hibernate
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getRegion(String regionName)` should be used instead of `SessionFactoryImplementor.getNaturalIdCacheRegion(String regionName)` method.
                    
                    hibernate
                    
                        getCache().getRegion(
                        getNaturalIdCacheRegion(
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    `org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel().entityPersister( entityName ).getNaturalIdCacheAccessStrategy()` should be used instead of `SessionFactoryImplementor.getNaturalIdCacheRegionAccessStrategy(String regionName)` method.
                    
                    hibernate
                    
                        getMetamodel().entityPersister( entityName ).getNaturalIdCacheAccessStrategy(
                        getNaturalIdCacheRegionAccessStrategy(
                    
                
            
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    
                        `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getCacheRegionNames()` should be used to obtain all cache region names, then `org.hibernate.engine.spi.SessionFactoryImplementor.getCache().getRegion(String regionName)` should be used to look up each region.
                    
                    
                    hibernate
                
            
        
        
        
            
                
                    IMPORT
                
            
            
                
                    Review usage of classes in `org.hibernate.cache.spi.RegionFactory`, as SPIs for this class has changed.  
                        See Javadoc for `org.hibernate.cache.spi.RegionFactory` for details.
                    
                    
                    hibernate
                
            
            
                
            
        
        
        
            
                
                    IMPLEMENTS_TYPE
                
            
            
                
                    
                        One potential upgrade concern is any custom `org.hibernate.cache.spi.QueryCacheFactory` implementations.  
                        `org.hibernate.cache.spi.QueryCacheFactory` was meant as a means to allow service providers the ability to define query result caching, generally with more stale-tolerant query result invalidation handling.  
                        However, the contract also bound it to the old second level cache contracts so they had to be updated.  
                        Its responsibilities also changed so we also decided to "rename it" to `org.hibernate.cache.spi.TimestampsCacheFactory`.  
                        Details can be found in HHH-11356 JIRA issue (link below).
                    
                    
                    
                    
                    hibernate
                
            
        
        
        
            
                
                    METHOD_CALL
                
            
            
                
                    
                        A change to be aware of is accessing cache entries via `SecondLevelCacheStatistics.getEntries()` and `NaturalIdCacheStatistics.getEntries()`.  
                        These methods have been deprecated, however the new caching SPI does not really require caching providers to support this.  
                        As of Hibernate 5.3 these methods inherently return an empty Map (`Collections#emptyMap`).  
                        This has always been something that providers did not implement "correctly" anyway.  
                        Details can be found in HHH-11356 JIRA issue (link below).
                    
                    
                    
                    
                    hibernate
                
            
            
                
            
        
        
            
                
                    METHOD
                
            
            
                
                    
                        
                            INHERITANCE
                            IMPLEMENTS_TYPE
                        
                    
                    
                        
                            
                                A change to be aware of is accessing cache entries via `NaturalIdCacheStatistics.getEntries()`.  
                                This method has been deprecated, however the new caching SPI does not really require caching providers to support this.  
                                As of Hibernate 5.3 this method inherently return an empty Map (`Collections#emptyMap`).  
                                This has always been something that providers did not implement "correctly" anyway.  
                                Details can be found in HHH-11356 JIRA issue (link below).
                            
                            
                            
                            
                            hibernate
                        
                    
                
            
        
        
            
                
                    METHOD
                
            
            
                
                    
                        
                            INHERITANCE
                            IMPLEMENTS_TYPE
                        
                    
                    
                        
                            
                                A change to be aware of is accessing cache entries via `SecondLevelCacheStatistics.getEntries()`.   
                                This method has been deprecated, however the new caching SPI does not really require caching providers to support this.  
                                As of Hibernate 5.3 these methods inherently return an empty Map (`Collections#emptyMap`).  
                                This has always been something that providers did not implement "correctly" anyway.  
                                Details can be found in HHH-11356 JIRA issue (link below).
                            
                            
                            
                            
                            hibernate
                        
                    
                
            
        
        
        
            
                
                    IMPORT
                
            
            
                
                    
                        The SPIs in the `org.hibernate.{packages}` package have changed.  
                        Any custom classes using those SPIs will need to be reviewed and updated.  
                        See Javadoc for these packages for details.
                    
                    
                    
                    hibernate
                
            
            
                
            
        
        
        
            
                
                    
                        
                    
                    
                        
                    
                
            
            
                
                    
                        Define `hibernate.default_schema` or `hibernate.default_catalog` (whichever is used by the selected dialect), or, alternatively, set `hibernate.hbm2ddl.jdbc_metadata_extraction_strategy=individually`.
                        
                        hibernate
                    
                
            
        
        
            
                
                    
                
                
                    
                
            
            
                
                    
                        If the application uses Hibernate, please define `hibernate.default_schema` or `hibernate.default_catalog` (whichever is used by the selected dialect), or, alternatively, set `hibernate.hbm2ddl.jdbc_metadata_extraction_strategy=individually`.
                        
                        hibernate
                    
                
            
        
        
        
            
                    
                        IMPORT
                    
            
            
                
                    Applications using the `@TableGenerator` should set the `hibernate.id.generator.stored_last_used` configuration property to `false`.
                    
                    hibernate
                
            
        
        
        
            
                
                
            
            
                
                    Any references to `org.hibernate.{className}.getType()` must be replaced with `org.hibernate.{className}.getHibernateType()`.
                    
                    hibernate
                    
                        getHibernateType
                        getType
                    
                
            
            
                
            
        
    





© 2015 - 2025 Weber Informatics LLC | Privacy Policy