I am using jsf and ejb3 for my project. i am getting the following exception Detached Entiy passed to persist while persisting project object.
i am creating this project object and passsing as parameter to ejb session bean method. for the first time it is working fine. but second time it is throwing the above exception. can any body help me.
When you return the entity back to the client from the bean, it becomes detached from the entitymanager. When you are passing the entity back to the bean, the second time, you have the option to call the
mergedEntity = entityManager.merge(entity);