Project

General

Profile

« Previous | Next » 

Revision 7443

for MN.update() we needed to pass the original pid, not the new pid

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
314 314
                String objectAsXML = "";
315 315
                try {
316 316
                    objectAsXML = IOUtils.toString(object, "UTF-8");
317
                    localId = insertOrUpdateDocument(objectAsXML, newPid, session, "update");
317
                    // give the old pid so we can calculate the new local id 
318
                    localId = insertOrUpdateDocument(objectAsXML, pid, session, "update");
318 319
                    // register the newPid and the generated localId
319 320
                    if (newPid != null) {
320 321
                        IdentifierManager.getInstance().createMapping(newPid.getValue(), localId);

Also available in: Unified diff