Skip to content

Commit

Permalink
update uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
rsehr committed Jan 21, 2025
1 parent 8c7e9d0 commit 29787b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,6 @@ private IEadEntry parseElement(int order, int hierarchy, Element element, Intege
entry.setId("id_" + UUID.randomUUID());
}

// generate new id, if id is null
if (entry.getId() == null) {
entry.setId("id_" + UUID.randomUUID());
}
entry.calculateFingerprint();

if (parent != null) {
Expand Down Expand Up @@ -1128,6 +1124,7 @@ public void addNode() {
}
}

@Override
public void deleteNode() {
if (selectedEntry != null) {
IEadEntry parentNode = selectedEntry.getParentNode();
Expand Down Expand Up @@ -2380,6 +2377,7 @@ public Document createEadFile() {
return document;
}

@Override
public String saveArchiveAndLeave() {
// save current node
if (selectedEntry != null) {
Expand All @@ -2399,6 +2397,7 @@ public String saveArchiveAndLeave() {

}

@Override
public String cancelEdition() {
// reset current settings
if (selectedEntry != null) {
Expand Down Expand Up @@ -2975,6 +2974,7 @@ public IConfiguration getDuplicationConfiguration() {
*
*/

@Override
public void updateSingleNode() {
if (selectedEntry != null) {
if (selectedEntry.getNodeType() == null && configuredNodes != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public static synchronized void saveNodes(Integer archiveId, List<IEadEntry> nod
if (i % 50 == 49 || i + 1 == nodes.size()) {
StringBuilder sql = new StringBuilder(insertSql);
sql.append(values.toString());
sql.append("ON DUPLICATE KEY UPDATE hierarchy = VALUES(hierarchy), order_number = VALUES(order_number), "
sql.append("ON DUPLICATE KEY UPDATE uuid = VALUES(uuid), hierarchy = VALUES(hierarchy), order_number = VALUES(order_number), "
+ "node_type = VALUES(node_type), sequence = VALUES(sequence), processtitle = VALUES(processtitle), "
+ "processtitle = VALUES(processtitle), parent_id = VALUES(parent_id), label = VALUES(label), data = VALUES(data)");
try (Connection connection = MySQLHelper.getInstance().getConnection()) {
Expand Down

0 comments on commit 29787b2

Please sign in to comment.