Thanks! I found that this a classic problem in web world when e.g. using JPA.
My solution is to create constructor copy in all my entities an make use a copy of the entity instead the one that is attached to the transaction session. It is solved now. ernasm wrote: > > On Mon, Jul 20, 2009 at 05:02, taltun<tunca...@gmail.com> wrote: >> >> Hi, >> >> I'm using S2 modular and JPA AppFuse version. >> >> >> When submitting a form using manual validation in my action. Even when >> the >> validation fails and the action method supposed to be called is not >> called >> at all, the dirty data is persisted ? >> >> How can I prevent data from being persisted if the validation fails ? >> >> Note: I use prepare method to load e.g an user object from a manager. >> And >> the data relates to the user object that is about. > > Hi, > I've encountered similar problem long time ago, and I forgot what I've > done exactly > to solve the problem. I think it's happened after I was playing around > with transaction > attributes. Please check your applicationContext.*.xml to find those > attributes. > > Hope this help. > > -- > Ernas Moethar > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > > > -- View this message in context: http://www.nabble.com/Prevent-persisting-data-when-validation-fails-tp24561330s2369p24582894.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net