2 Replies Latest reply on Apr 28, 2006 3:06 AM by Fane Babanu

    em.refresh() throws an error at me

    Fane Babanu Newbie

      I have a domain model like this: Company -* Department -* Employee

      On a Company's page I list all Departments with their Employees.
      When I delete an Employee, the page has to be updated so I do this in the backing bean:

      departments = company.getDepartments();

      When I refresh the company after deleting an employee I get this:

      javax.ejb.EJBTransactionRolledbackException: javax.persistence.EntityNotFoundException: org.hibernate.UnresolvableObjectException: No row with the given identifier exists: [com.example.Employee#231]

      Any idea why, or how to avoid this? Or maybe a different way of refreshing my view? Thanks.