Bug #154
closedchange INSERT to fail if docid exists
0%
Description
Higgins writes:
I have a suggestion for a change in the behavoir of Insert commands in Metacat.
Presently, if one tries to 'Insert' a document and provides a proposed ID,
Metacat checks to see if the ID is already in the database. If it is, a new ID
is automatically created and the document is inserted with that new ID.
That behavior is fine if the user (client) is trying to insert a new document.
It avoids different documents with the same ID. However, a common case is trying
to revise a document with a known ID. And, unfortunately, if the client tries to
'Insert' a revised document by hitting the 'Insert (Submit)' button rather than
"Revise' button, a second copy of the document will be placed in the database.
I am thus suggesting that a better behavior for the Insert command is to simply
reject the insertion when a duplicate ID is provided and that ID is already in
use, rather than inserting the document with a new ID. Ths user can insert the
document without an ID if adding the document is what is really desired, or
revise the document with the given ID using the revise command if that is what
is really wanted.