[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-682) seam-gen edit page doesn't support saving after deletion
Christian Bauer (JIRA)
jira-events at jboss.com
Mon Jan 22 04:11:58 EST 2007
seam-gen edit page doesn't support saving after deletion
--------------------------------------------------------
Key: JBSEAM-682
URL: http://jira.jboss.com/jira/browse/JBSEAM-682
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Reporter: Christian Bauer
Priority: Minor
The Delete button on the seam-gen generated edit page calls home.remove(), which effectively detaches the deleted entity. Since the edit page is redisplayed, and the detached entity is rendered in the form, clicking Save results in an exception:
Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: org.jboss.seam.wiki.core.Foo
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
Overriding the persist() method and using em.merge() would solve this temporarily, I think it is better if the generated edit page would redirect to the list page after deletion.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list