Search 6 groundwork - Restore support for non-@Id document IDs in the ORM integration

Description

Basic code is here, but we don't have tests in ORM, and I discovered problems when I added a test.

In particular, when the @DocumentId is the @Id, we should use the provided ID in priority and only if it's missing, unproxy the entity and get the ID;
when the @DocumentId is NOT the @Id, always ignore the provided ID. See org.hibernate.search.engine.impl.WorkPlan.PerClassWork.extractProperId(Work) in Search 5.

See this branch: https://github.com/yrodiere/hibernate-search-6-poc/tree/HSEARCH-3203

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major