1. EntityNotFoundException not thrown by Hibernate JPA forum.hibernate.orgI am using the EntityManager#find() method to load a managed entity. The problem is that if the managed entity does not exist in database, EntityNotFoundException is not thrown. Here is the code that I am using. Code: try { tran.begin(); ... |
2. EntityNotFoundException forum.hibernate.orgHi! I get an EntityNotFoundException from the EntityManager.find()-Method. I've the following DB structure: : Table "Order": -id -myClassId Table "MyClasses": -id My POJOs look like: Order { int id; MyClass myClass; } MyClass { int id; } In case when no MyClass is defined for an Order, the field myClassId hat the Integer value 0 (not NULL). When calling the find()-method ... |