Class MutableJpaComplianceImpl

    • Constructor Detail

      • MutableJpaComplianceImpl

        public MutableJpaComplianceImpl​(Map configurationSettings)
      • MutableJpaComplianceImpl

        public MutableJpaComplianceImpl​(Map configurationSettings,
                                        boolean jpaByDefault)
        Generallythe
        Parameters:
        configurationSettings -
        jpaByDefault -
    • Method Detail

      • isJpaQueryComplianceEnabled

        public boolean isJpaQueryComplianceEnabled()
        Description copied from interface: JpaCompliance
        Controls whether Hibernate's handling of JPA's Query (JPQL, Criteria and native-query) should strictly follow the JPA spec. This includes both in terms of parsing or translating a query as well as calls to the Query methods throwing spec defined exceptions where as Hibernate might not. Deviations result in an exception if enabled
        Specified by:
        isJpaQueryComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
      • isJpaTransactionComplianceEnabled

        public boolean isJpaTransactionComplianceEnabled()
        Description copied from interface: JpaCompliance
        Indicates that Hibernate's Transaction should behave as defined by the spec for JPA's EntityTransaction since it extends the JPA one.
        Specified by:
        isJpaTransactionComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
      • isJpaListComplianceEnabled

        public boolean isJpaListComplianceEnabled()
        Description copied from interface: JpaCompliance
        Controls how Hibernate interprets a mapped List without an "order columns" specified. Historically Hibernate defines this as a "bag", which is a concept JPA does not have. If enabled, Hibernate will recognize this condition as defining a PersistentList, otherwise Hibernate will treat is as a PersistentBag
        Specified by:
        isJpaListComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way, interpreting the mapping as a "list", rather than a "bag"
      • isJpaClosedComplianceEnabled

        public boolean isJpaClosedComplianceEnabled()
        Description copied from interface: JpaCompliance
        JPA defines specific exceptions on specific methods when called on EntityManager and EntityManagerFactory when those objects have been closed. This setting controls whether the spec defined behavior or Hibernate's behavior will be used. If enabled Hibernate will operate in the JPA specified way throwing exceptions when the spec says it should with regard to close checking
        Specified by:
        isJpaClosedComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
      • isJpaProxyComplianceEnabled

        public boolean isJpaProxyComplianceEnabled()
        Description copied from interface: JpaCompliance
        JPA spec says that an EntityNotFoundException should be thrown when accessing an entity Proxy which does not have an associated table row in the database. Traditionally, Hibernate does not initialize an entity Proxy when accessing its identifier since we already know the identifier value, hence we can save a database roundtrip. If enabled Hibernate will initialize the entity Proxy even when accessing its identifier.
        Specified by:
        isJpaProxyComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
      • isJpaCacheComplianceEnabled

        public boolean isJpaCacheComplianceEnabled()
        Description copied from interface: JpaCompliance
        Should Hibernate comply with all aspects of caching as defined by JPA? Or can it deviate to perform things it believes will be "better"?
        Specified by:
        isJpaCacheComplianceEnabled in interface JpaCompliance
        Returns:
        true says to act the spec-defined way.
      • isGlobalGeneratorScopeEnabled

        public boolean isGlobalGeneratorScopeEnabled()
        Description copied from interface: JpaCompliance
        Should the the scope of TableGenerator.name() and SequenceGenerator.name() be considered globally or locally defined?
        Specified by:
        isGlobalGeneratorScopeEnabled in interface JpaCompliance
        Returns:
        true indicates the generator name scope is considered global.
      • isJpaOrderByMappingComplianceEnabled

        public boolean isJpaOrderByMappingComplianceEnabled()
        Description copied from interface: JpaCompliance
        Should we strictly handle OrderBy expressions? JPA says the order-items can only be attribute references whereas Hibernate supports a wide range of items. With this enabled, Hibernate will throw a compliance error when a non-attribute-reference is used.
        Specified by:
        isJpaOrderByMappingComplianceEnabled in interface JpaCompliance
      • isLoadByIdComplianceEnabled

        public boolean isLoadByIdComplianceEnabled()
        Description copied from interface: JpaCompliance
        JPA says that the id passed to EntityManager.getReference(java.lang.Class<T>, java.lang.Object) and EntityManager.find(java.lang.Class<T>, java.lang.Object) should be the exact expected type, allowing no type coercion. Historically, Hibernate behaved the same way. Since 6.0 however, Hibernate has the ability to coerce the passed type to the expected type. This setting controls whether such a coercion should be allowed.
        Specified by:
        isLoadByIdComplianceEnabled in interface JpaCompliance