[hibernate-issues] [Hibernate-JIRA] (HHH-7955) UX improvement: Check for inconsistency between declared and actual class to prevent "IllegalArgumentException: object is not an instance of declaring class"