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

HBX-2868: Replace use of deprecated constructor 'org.hibernate.mapping.Table#Table() #4868

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
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 @@ -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
Loading