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

1 view
Skip to first unread message

Alexander Obuhovich

unread,
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.
specific_field_db_update_core.patch
specific_field_db_update_modules.patch
Reply all
Reply to author
Forward
0 new messages