[Nitro] Revisable -- is it the correct semantics??

James Britt james.britt at gmail.com
Wed Jun 28 01:16:13 EDT 2006

Michael Fellinger wrote:
> On Wednesday 28 June 2006 12:25, James Britt wrote:

>>What was revised?  You want the revision number to get upped on every
>>save, even if the item has not changed?  Hmmm.
>>On the other hand, to do otherwise may introduce assorted questions
>>about determining when something has changed in a meaningful way (i.e.,
>>some concept of a  'dirty' flag)
> Which also raises the question of partial updates - depending on what 
> changed...
> That is what i forgot - i think there's no problem with rising the revision on 
> save... is there?

Well, the simplest thing may be to just assume that a call to 'save' 
means there was a change (else why save it?), and the business logic 
just has to take that into account.  Then if someone doesn't want these 
gratuitous revisions, they can implement some has_changed? behavior and 
skip the save (perhaps intercept the call to save and do an update, 
instead) if by whatever logic the object is not to be considered revised.

James Britt

"I often work by avoidance."
- Brian Eno

More information about the Nitro-general mailing list