Polymorphic CriteriaQuery without inverse relationship
问题 I have the following EJB structure. Don't wonder about Animal and Inventory , these classes are only here to demonstrate the structure in a simplified way ( Update : I have revised the class names to construct a better understandable example. Another implementation of IdTag might be a BarcodeId ). Note that there is no inverse relationship from IdTag to Animal or Inventory , and let's assume the RfidTag.code is unique. I read Retrieving Polymorphic Hibernate Objects Using a Criteria Query and