Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deleting objects from the SQL DB which are keyed by a UUID. #7605

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading