I have a remove method in an EJB as below
@Override
public void remove(Project project)
{
em.remove(em.merge(project));
}
The project I pass has been retrieved from another class as shown below:
try
{
Project tmpProject = getProjectEJB().getById(projectId);
getProjectEJB().remove(tmpProject);
}
catch (Exception ex)
{..}
the result of the remove is that is doesn't remove the object (which is quite reasonable in itself because Project has several relationships pointing to it) what I can't understand is why JPA doesn't return any error but simply silently fails.