ClassCastException on use of PersistenceUtilHelper when entities use Enhanced Proxies

Description

The org.hibernate.jpa.internal.util.PersistenceUtilHelper helper can not deal with entities which are using the new "Enhanced Proxy" feature; this would result in a ClassCastException such as

Relates to https://github.com/quarkusio/quarkus/issues/8323

Environment

None
Fixed

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

backPortable

Backport?