Skip to content

Commit

Permalink
Update table name getter so reserved keywords can be used as table name
Browse files Browse the repository at this point in the history
  • Loading branch information
apik007 committed Mar 26, 2024
1 parent 061db01 commit d834e4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cz.foresttech</groupId>
<artifactId>ForestDatabase</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ private static String getTableName(Class<?> clazz) {
tableName = camelCaseToSnakeCase(clazz.getSimpleName());
}

return tableName;
if (tableName.isEmpty()) {
return tableName;
}

return "\"" + tableName + "\"";
}

/**
Expand Down

0 comments on commit d834e4b

Please sign in to comment.