Fix unintended binary compatibility breaks between 5.1 and 5.3

Description

Re-add the following (really "pull up" from CommonQueryContract):


Re-add:

Can simply be default delegating to settings.getJpaCompliance().isJpaQueryComplianceEnabled()


The following were changed to implement AutoCloseable rather than Closeable. The inheritance here is a bit unexpected (imo) - Closeable extends AutoCloseable, rather than the other way around. Although it generally should not matter (generally this is intended for use in try-with-resources), its not difficult to add back the binary compat by having these extend Closeable. In addition to AutoCloseable, or instead of? Extending AutoCloseable is unnecessary, but imo bettter documenting of the intention.


Was removed without being properly deprecated. Unfortunately its meaning and implementation are no longer relevant/meaningful. Best course of action is to:

  1. Re-introduce the method in 5.3

  2. Deprecate this re-added method

  3. Define this method as a default delegating to grab the name out of the EMF properties


Re-add:

All can be defaulted to delegate to the forms accepting SharedSessionContractImplementor.


In either 5.2 or 5.3 this changed to return org.hibernate.query.Query - Change this back to org.hibernate.Query.


All changed in either 5.2 or 5.3 to return org.hibernate.query.NativeQuery (the replacement for the deprecated org.hibernate.SQLQuery) rather than org.hibernate.SQLQuery. This should be reverted to return org.hibernate.SQLQuery instead, though returning T (as in org.hibernate.SQLQuery<T extends org.hibernate.SQLQuery>)


In 5.1 this method returns org.hibernate.SQLQuery. In 5.3 it returns org.hibernate.query.NativeQuery via QueryProducer covariant. This should be reverted


In 5.1 returns org.hibernate.Query. In 5.3 it returns org.hibernate.query.Query via QueryProducer covariant. This should be reverted.


org.hibernate.jpa.AvailableSettings#JPA_METAMODEL_POPULATION accidentally got removed (more correctly, moved - org.hibernate.cfg.AvailableSettings instead)

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major
Configure