Do not rely on automatic detection of JPA annotations from the classpath

Description

The Hibernate Search engine, which is supposedly independent from Hibernate ORM, is actually changing its mapping semantics (and validations) depending on the presence (or not) of some key JPA annotations for historical reasons.

This represents an inconsistent behaviour for some integrators not relying on Hibernate ORM, as the presence (or not) of some other third party dependency will influence the mapping validation.

Now that the JPA API is no longer an optional dependency of Hibernate ORM, we should switch this to an explicit (internal) configuration setting controlled by the SearchIntegrator.

By cleaning this up I also happened to find some inconsistencies in our tests.

Environment

None

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure