Ability to update only given fields via kDBItem::Update method

1 view
Skip to first unread message

Alexander Obuhovich

Jul 16, 2012, 12:39:08 PM7/16/12
to In-Portal Development
Right now, when some fields of kDBItem object are changed and kDBItem::Update method is issued then all fields are put into UPDATE sql and not only ones, that were changed.

I'm proposing to add 2nd optional parameter (1st parameter is $id) to kDBItem::Update method to allow specifying fields, that should only be updated in database. Also only these fields will be overwritten in kDBItem::OriginalFieldValues array.
This way there is still way to detect change in field values, that were not specified to kDBItem::Update method.

Ready for testing.
Reply all
Reply to author
0 new messages