[jOOQ/jOOQ#7172] [jOOQ/jOOQ#10274] Fix regression
The previous fix for TableImpl::equals was incorrect when the schema is qualified with a catalog
This commit is contained in:
parent
2592960afe
commit
9a60e71852
@ -69,6 +69,7 @@ public class SchemaImpl extends AbstractNamed implements Schema {
|
||||
|
||||
private static final long serialVersionUID = -8101463810207566546L;
|
||||
private static final Clause[] CLAUSES = { SCHEMA, SCHEMA_REFERENCE };
|
||||
static final Schema DEFAULT_SCHEMA = new SchemaImpl("");
|
||||
|
||||
private Catalog catalog;
|
||||
|
||||
|
||||
@ -50,7 +50,9 @@ import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.impl.Internal.createPathAlias;
|
||||
import static org.jooq.impl.Keywords.K_TABLE;
|
||||
import static org.jooq.impl.QueryPartListView.wrap;
|
||||
import static org.jooq.impl.SchemaImpl.DEFAULT_SCHEMA;
|
||||
import static org.jooq.impl.Tools.getMappedTable;
|
||||
import static org.jooq.tools.StringUtils.defaultIfNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
@ -367,8 +369,8 @@ public class TableImpl<R extends Record> extends AbstractTable<R> {
|
||||
|
||||
// [#7172] [#10274] Cannot use getQualifiedName() yet here
|
||||
StringUtils.equals(
|
||||
getSchema() == null ? "" : getSchema().getName(),
|
||||
other.getSchema() == null ? "" : other.getSchema().getName()
|
||||
defaultIfNull(getSchema(), DEFAULT_SCHEMA),
|
||||
defaultIfNull(other.getSchema(), DEFAULT_SCHEMA)
|
||||
) &&
|
||||
StringUtils.equals(getName(), other.getName()) &&
|
||||
Arrays.equals(parameters, other.parameters);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user