I have created an Embeddable class that serves as a table key that extends an already defined MappedSuperclass which results in a composite-key for the table.
Now using the JPA Criteria API shown below, the code throws a NullPointerException when attempting to find the records:
After fiddling with this, I have determined that if the BaseId class is associated to another class designated as an Entity, then the NullPointerException isn't thrown an the above query works. However, if the BaseId isn't associated to any entity and merely serves as a common class across a series of derived classes, Hibernate will throw the following error:
Hibernate 4.3.5 Final