if (previous != null) {
Publication oldoc = step.getDocument(previous.getIndex());
boolean done = getStepService().remove(step, oldoc); // Decrements the configuration tag count of document
- if (done) {
+/* if (done) {
oldoc = getPublicationDAO().merge(oldoc); //RKV: to avoid: NonUniqueObjectException: a different object with the same identifier value was already associated with the session
- getPublicationDAO().delete(oldoc); // WARNING: Potential problem because it's not automatically done as orphan object
+ //RKV: use delete-orphan by removing from project element, see StepService.remove
+ //RKV: getPublicationDAO().delete(oldoc); // WARNING: Potential problem because it's not automatically done as orphan object
}
- }
+*/ }
getStepService().add(step, aPublication); // Increments the configuration tag count of document
// Import the document properties and update of the study