HIbernate now enforces unique JPA Entity names (i.e. unqualified class names)

Description

As of the Hibernate 5.4 (that we upgraded to in June), classes representing data entities/schemas need to have unique JPA entitiy names - the problem is that the default JPA entity name for a class is the unqualified class name - i.e. if two classes of the same name in different packages (e.g. different CorDapps) define entities, they can't be loaded into a node at the same time.
In the case of inner classes, the name of the outer class does not get stripped, so two entities in differently named schemas would be fine.
The Hibernate change was in ticket https://hibernate.atlassian.net/browse/HHH-13060.
People have run into the issue, see e.g. https://hibernate.atlassian.net/browse/HHH-13149

It is currently causing issues with the performance test cordapp in Enterprise - we can work around that, but we don't have control over what other CorDapp writers name their schema/entity classes - the fact that two classes from different packages can clash is not a great situation to be in.

Status

Assignee

Unassigned

Reporter

Christian Sailer

Labels

None

Feature Team

Select team

Story Points

None

Fix versions

None

Ported to...

None

Priority

Medium
Configure