[jboss-user] [JBoss Seam] - automatic persitence on RENDER_RESPONSE
christophe.laumond
do-not-reply at jboss.com
Thu Sep 28 06:36:55 EDT 2006
Hi,
I have something like
| @Entity
| public class Question implements java.io.Serializable {
|
| @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "question")
| public Set<Answer> getAnswers() {
| return this.answers;
| }
|
Before rendering I add Answer instance to the above Set but I don't want to persist them, I just need them in order to retrieve value fromt the UI and according to the value i will persist some of them and discard some others.
But on the render response event I got the following stacktrace :
anonymous wrote :
| 2006-09-28 14:07:53,984 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] committing transaction after phase: RENDER_RESPONSE(6)
| 2006-09-28 14:07:53,984 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-09-28 14:07:53,984 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
|
and all the Answer instances are persisted !
It looks like method like save() or update() are called automatically during this phase.
I would like to prevent this and understand why this happens.
Is this related to my faces-config file lifcycle tag :
anonymous wrote :
|
| <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
|
|
thanks in advance for your feedback
Regards,
Christophe
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974827#3974827
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974827
More information about the jboss-user
mailing list