Re: Lost update question

2001-05-03 Thread Gerald Richter
> > After a tiny bit of thinking maybe simple field > > last_update TIMESTAMP > > would be even simpler. It could even be automatically updated from a > DB trigger, so I'd only need to modify UPDATEs as you proposed > Yes, this will work too, but it's database dependend. > $set -> Update (\%

Re: Lost update question

2001-05-03 Thread Robert
Gerald Richter wrote: > > > > > This definitely saves the overhead of passing around another version > > of data, but requires a modification of all table structures. I don't > > see how it can be done with a Recordset filter, could you give me a > > clue? > > > > $db -> TableAttr ($tabname, '

Re: Lost update question

2001-05-02 Thread Robert
Gerald Richter wrote: > > $db -> TableAttr ($tabname, '!Filter', { '\\updatecnt' => [ sub > 'updatecnt_seq.nextVal' }, undef, DBIx::Recordset::rqUPDATE ] }) ; > > This assumes that you have a database that has sequences (Postgres, Oracle) > and you take the next number out of the sequence. If

Re: Lost update question

2001-05-02 Thread Gerald Richter
> > This definitely saves the overhead of passing around another version > of data, but requires a modification of all table structures. I don't > see how it can be done with a Recordset filter, could you give me a > clue? > $db -> TableAttr ($tabname, '!Filter', { '\\updatecnt' => [ sub 'upd

Re: Lost update question

2001-05-02 Thread ___cliff rayman___
Robert wrote: > Hi, > > I need to solve the "lost update problem" (when two users are editing > the same database record, one's changes are lost when they both save > it). I'm thinking about putting original version of the record in the > hidden field (serialied by Storable) and upon saving do

Re: Lost update question

2001-05-02 Thread Robert
Gerald Richter wrote: > > > I need to solve the "lost update problem" (when two users are editing > > the same database record, one's changes are lost when they both save > > it). I'm thinking about putting original version of the record in the > > hidden field (serialied by Storable) and upon

Re: Lost update question

2001-05-02 Thread Gerald Richter
Hi, > > I need to solve the "lost update problem" (when two users are editing > the same database record, one's changes are lost when they both save > it). I'm thinking about putting original version of the record in the > hidden field (serialied by Storable) and upon saving do SELECT ... FOR >

Lost update question

2001-05-02 Thread Robert
Hi, I need to solve the "lost update problem" (when two users are editing the same database record, one's changes are lost when they both save it). I'm thinking about putting original version of the record in the hidden field (serialied by Storable) and upon saving do SELECT ... FOR UPDATE, com