Naveen.P
Naveen.P

Reputation: 61

what happened when you load a document at a URI that already exists in the Marklogic database?

what happened when you load a document at a URI that already exists in the Marklogic database?

Upvotes: 1

Views: 84

Answers (2)

Harry Bakken
Harry Bakken

Reputation: 793

The previously stored document at that URI is overwritten (including permissions, collections, or quality if specified in the function call) if the user has a role that has update permissions on that URI. If the user does not have update permissions for the URI, an error will be thrown.

Upvotes: 0

Daniele
Daniele

Reputation: 1063

You overwrite the previous stored version.

you can also simply try this out with an

fn:doc("uri");
xdmp:document-insert("uri", ...<your content here>... );
fn:doc("uri");

and see that the output matches what you have just inserted

Upvotes: 3

Related Questions