[Solar-talk] some thoughts about models

Travis Swicegood development at domain51.com
Tue Aug 14 14:38:55 CDT 2007


On Aug 14, 2007, at 12:48 PM, Paul M Jones wrote:
>> The UPDATE method :
>> - don't update a field if the value is not changed
>
> That one's a little harder, but it *is* planned.


I've done basic implementations of this.  In all of the cases I've  
run into, I've always found it enough to just keep modifications  
after the initial set in a $this->_changes array and just use those  
when dealing with the database.  An extra benefit is that you get  
isNew() and isModified() practically for free.

-Travis


More information about the Solar-talk mailing list