I'm working on a JavaEE application with EJB and JPA.
When I try to get an entity that doesn't exist in the EntityManager an exception occurs. but when I do:
Entity e=em.find(Entity.class,primarykey);
if(e.equals(null)){
return "error!";
}
Can please someone help me solve this problem?