Strategy for out of date items through forms using hibernate?

2003-12-17 Thread David Erickson
Hi I am using Struts with Hibernate in a webapplication.. we are using forms etc. The problem I am currently trying to decide how to handle is thus: Assume user 1 loads up an object in a form and is modifying it. Assume user 2 loads up the same object in a form and is also modifying it. User 1 sub

Re: Strategy for out of date items through forms using hibernate?

2003-12-17 Thread Jason Lea
I have done this. Hibernate supports versioning (using a version number column), if you use this Hibernate can make sure the changes are not overwritten. The basic process is: 1. Hibernate session A loads object A1 (with identifier 1234) 2. Hibernate session B loads object B1 (also with identif

Re: Strategy for out of date items through forms using hibernate?

2003-12-17 Thread David Erickson
> I have done this. Hibernate supports versioning (using a version number > column), if you use this Hibernate can make sure the changes are not > overwritten. > > The basic process is: > 1. Hibernate session A loads object A1 (with identifier 1234) > 2. Hibernate session B loads object B1 (also w

Re: Strategy for out of date items through forms using hibernate?

2003-12-17 Thread Jason Lea
With versioning hibernate increments the version number each time. I believe this is prefrered to the timestamp method, but I think hibernate supports both. (off the top of my head) I have a struts form which holds the fields etc plus the object I loaded from Hibernate. I use DispatchLookUp a

Re: OT: Strategy for out of date items through forms using hibernate?

2003-12-17 Thread Vic Cekvenich
I avoid timestamps. Just make your where class = to the selct cluase. In case any colum is changed, it fails. (if you really need this) .V David Erickson wrote: Hi I am using Struts with Hibernate in a webapplication.. we are using forms etc. The problem I am currently trying to decide how to h