Skip to content

Commit

Permalink
HBX-2868: Replace use of deprecated constructor 'org.hibernate.mappin…
Browse files Browse the repository at this point in the history
…g.Table#Table()

Signed-off-by: Koen Aers <[email protected]>
  • Loading branch information
koentsje committed Jul 18, 2024
1 parent dab2e39 commit 99660eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void addSuggestedIdentifierStrategy(String catalog, String schema, String
}

private Table createTable(String catalog, String schema, String name) {
Table table = new Table();
Table table = new Table("Hibernate Tools");
table.setAbstract(false);
table.setName(name);
table.setSchema(schema);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static void bindTables(
ArrayList<Element> tables,
OverrideRepository repository) {
for (Element element : tables) {
Table table = new Table();
Table table = new Table("Hibernate Tools");
table.setCatalog(getAttribute(element, "catalog"));
table.setSchema(getAttribute(element, "schema"));
table.setName(getAttribute(element, "name"));
Expand Down Expand Up @@ -154,7 +154,7 @@ private static List<String> bindColumns(
List<Column> localColumns = new ArrayList<Column>();
localColumns.add(column);
List<Column> foreignColumns = new ArrayList<Column>();
Table foreignTable = new Table();
Table foreignTable = new Table("Hibernate Tools");
foreignTable.setName(foreignTableName);
foreignTable.setCatalog(
element.hasAttribute("foreign-catalog") ?
Expand Down Expand Up @@ -192,7 +192,7 @@ private static void bindForeignKeys(
String constraintName = getAttribute(element, "constraint-name");
String foreignTableName = getAttribute(element, "foreign-table");
if (foreignTableName != null) {
Table foreignTable = new Table();
Table foreignTable = new Table("hibernate tools");
foreignTable.setName(foreignTableName);
foreignTable.setCatalog(
element.hasAttribute("foreign-catalog") ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class HibernateUtilTest {

@Test
public void testGetForeignKey() {
Table table = new Table();
Table table = new Table("Hibernate Tools");
assertNull(HibernateUtil.getForeignKey(table, "foo"));
assertNull(HibernateUtil.getForeignKey(table, "bar"));
table.createForeignKey("foo", Collections.emptyList(), "Bar", null);
Expand Down

0 comments on commit 99660eb

Please sign in to comment.