On Apr 13, 6:34 am, akhil <[email protected]> wrote: > Hi, > > Is there anyway to handle dirty updates or version a model/object in > sequel. > > One way to do is to have a version attribute for every object/row > which could be an integer and increment it on every update.
Assuming you don't need to keep old versions of the row, you've basically described the optimistic locking plugin. If you do need to keep old versions, I'm not aware of an existing plugin that handles such a thing, but it should be possible to create one. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
