Ok. Then the problem is clear. As the pattern creates for you a new session in each request, the object you are trying to update is DETACHED, so unless you associate to a PERSISTENT instance in the current session, you will get the error. But as I can imagine this is not possible, you will have just to reattach the object to the current session, by using:

session.lock(object, LockMode.NONE)

in your backing bean.

But I would suggest to make your backing bean session-scoped, and also to enable the second-level cache ;-)

2006/2/2, ::SammyRulez:: <[EMAIL PROTECTED]>:
1) yes

2) request-scoped

2006/2/2, Enrique Medina <[EMAIL PROTECTED]>:
> Some questions:
>
> 1) Do you use the Open Session in View filter pattern?
>
> 2) Is your backing bean request-scoped or session-scoped or
> application-scoped?
>
> 2006/2/2, ::SammyRulez:: < [EMAIL PROTECTED]>:
> > Hi all
> >
> > I have a form for some data entry and a data table displaying the rows
> > already entered in the same view.
> >
> > Everything works great except update. Since the restore view phase
> > occurs data is loaded and is I try to update I have an Hibernate
> > exception since there is another object in the session with the same
> > type and ID.(witch is correct.)
> >
> > Is there any good approach to this problem without scrolling the list
> > update the values and flushing the session?
> >
> > BTW form validation is required :-(
> >
> > --
> > ::SammyRulez::
> > http://sammyprojectz.blogspot.com
> >
>
>


--
::SammyRulez::
http://sammyprojectz.blogspot.com

Reply via email to