Skip to content

Commit

Permalink
Potential fix for UUID-keyed objects not being deleted. (#7605)
Browse files Browse the repository at this point in the history
  • Loading branch information
LlmDl authored Sep 19, 2024
1 parent 0eb737a commit 59ff26e
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,12 @@ public boolean queueDeleteDB(String tb_name, Map<String, ?> args) {
Object[] values = args.values().stream().toArray();
for (int count = 0; count < values.length; count++) {
Object object = values[count];
if (object instanceof String)
statement.setString(count + 1, (String) object);
else if (object instanceof Boolean)
statement.setBoolean(count + 1, (Boolean) object);
if (object instanceof String str)
statement.setString(count + 1, str);
else if (object instanceof Boolean b)
statement.setBoolean(count + 1, b);
else if (object instanceof UUID uuid)
statement.setObject(count + 1, uuid.toString());
else
statement.setObject(count + 1, object);
}
Expand Down Expand Up @@ -448,6 +450,10 @@ public String tableName() {
return tableName;
}

public String primaryKey() {
return primaryKey;
}

private String getSingular() {
// Hibernated Residents are never loaded so this method is never called on them.
return tableName.substring(0, tableName.length()-1).toLowerCase(Locale.ROOT);
Expand Down

0 comments on commit 59ff26e

Please sign in to comment.