We have a JPA entity model which consists of two different entities which are mapped to the same database table. The reason why two separate entities exists is that we use them in two separate parts of the application (separate application modules) and they differ in attributes which they hold. This scenario was working perfectly in Hibernate 4.2.18.
After upgrade to 5.2.10 (JPA 2.1), we started experiencing the DuplicateMappingException: Duplicate table mapping, which occurs on the application startup. The entities are defined as follows:
The exception we receive is:
Although we run this application on WebSphere, we do not use the default (built-in) Java Persistence provider.
Thanks in advance for any insight and suggestions.
WebSphere AS 9.0 (Classic Edition) + Oracle 12c