Skip to content
Snippets Groups Projects
Commit 6ba9bffb authored by gmantele's avatar gmantele
Browse files

[TAP] Fix an artefact of 19026c1b.

TAPTable.copy(...) and TAPColumn.copy(...) use directly the attribute dbName
instead using getDBName() ; indeed getDBName() <> dbName.
Because of this bug, queries with aliased tables did not work anymore.
parent 6fc7f8fd
No related branches found
No related tags found
No related merge requests found
......@@ -945,7 +945,7 @@ public class TAPColumn implements DBColumn {
@Override
public DBColumn copy(final String dbName, final String adqlName, final DBTable dbTable){
TAPColumn copy = new TAPColumn((adqlName == null) ? this.adqlName : adqlName, datatype, description, unit, ucd, utype);
copy.setDBName((dbName == null) ? this.dbName : dbName);
copy.setDBName((dbName == null) ? this.getDBName() : dbName);
copy.setTable(dbTable);
copy.setIndexed(indexed);
......
......@@ -1060,7 +1060,7 @@ public class TAPTable implements DBTable {
@Override
public DBTable copy(final String dbName, final String adqlName){
TAPTable copy = new TAPTable((adqlName == null) ? this.adqlName : adqlName);
copy.setDBName((dbName == null) ? this.dbName : dbName);
copy.setDBName((dbName == null) ? this.getDBName() : dbName);
copy.setSchema(schema);
Collection<TAPColumn> collColumns = columns.values();
for(TAPColumn col : collColumns)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment