Project

General

Profile

Task #1332

Story #1329: ^^^^ Items To Discuss ^^^^

Possibly remove MN_crud.update()

Added by Roger Dahl about 13 years ago. Updated about 13 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-09
Due date:
% Done:

0%

Milestone:
Product Version:
*
Story Points:
Sprint:

Description

In the current GMN implementation, MN_crud.update() is simply MN_crud.delete() followed by MN_crud.create(). If that will be true for all implementations, we may want to remove MN_crud.update() and have MNs implement only create() and delete(), and, if necessary, support update() in the D1 libraries.

History

#1 Updated by Matthew Jones about 13 years ago

I think that algorithm is missing critical semantics. First, I think we decided that delete shouldn't actually delete an object -- rather, it should move it out of search indices.

Second, update is not equivalent to delete then create, because the second create should only be allowed if the caller has write permission on the original object. Plus there is system metadata (obsoletes/obsoletedBy) that needs to be changed for both objects, and that should only be changed if the caller has appropriate permissions. That is why the obsoleted id is in the method signature for update(), making it wasy for implementers to do this access check. MN implementations need to be very careful about what sysmeta they accept during these operations.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)