[jboss-user] [JBoss Seam] - Re: deleted entity passed to persist

2007-08-08 Thread fhh
Do you also remove the entity from the datamodel and/or list that is backing the table? Regards Felix View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4071888#4071888 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4071888

[jboss-user] [JBoss Seam] - Re: deleted entity passed to persist

2007-08-08 Thread ellenzhao
yes, that's what I wanted to remove. I changed my code like this and it worked smoothly now: From the controller bean, removed the code: | public void removeAnItem(Item anItem){ | entityManager.remove(anItem); | } | In the entity bean ShoppingPlan, added this method: | public

[jboss-user] [JBoss Seam] - Re: deleted entity passed to persist

2007-08-08 Thread Manuel Palacio
What happens if you have: | public void removeAnItem(Item anItem){ | entityManager.remove(entityManager.merge(anItem)); | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4071955#4071955 Reply to the post :

[jboss-user] [JBoss Seam] - Re: deleted entity passed to persist

2007-08-08 Thread blackers
I am assuming you have a @ManyToOne realationship in the Entity you are trying to delete. On the @OneToMany side you most likely have | @OneToMany(cascade = CascadeType.ALL, .) | If you change to @OneToMany(cascade = {CascadeType.MERGE,CascadeType.REMOVE}, ) It may solve

[jboss-user] [JBoss Seam] - Re: deleted entity passed to persist

2007-08-08 Thread samdoyle
or em.merge( yourUpdatedEntity ) explicitly View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072302#4072302 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072302 ___ jboss-user