[jboss-user] [JBoss Seam] - "detached entity passed to persist" problem

Andreh do-not-reply at jboss.com
Thu Dec 7 13:27:02 EST 2006


Hi all,

I'm new to seam, and I'm creating a project here

I'm getting this Exception:


  | Exception during INVOKE_APPLICATION(5): javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: br.com.dehproject.UsuarioEntity

I know that I could use em.merge() to skip this, but I want to create a new object, not to update the actual one. My UsuarioEntity has a SESSION Scope, so that's why I get this... but I need the SESSION scope to the next page in my JSF to manage the contents of the object... 

I have a page that register the users, and then redirect to another page where I manage the contents of the user using a Entity with a EVENT scope... But if I get back to the register page, I cannot persist another one and throw the Exception that I pasted above... =/ I want to create a new object to persist that has nothing to do with the other one... 

How can I turn back and persist another object? but I also need to continue with a SESSION Scope, or I wish to have some idea from you... 

Thanks! 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992029#3992029

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992029



More information about the jboss-user mailing list