[#6303] [#6304] Improve internal TableAlias discovery

This commit is contained in:
lukaseder 2017-06-01 11:30:51 +02:00
parent 100b2dee35
commit 3bd477da80

View File

@ -3725,4 +3725,13 @@ final class Tools {
return DSL.field(DSL.name(name), field.getDataType());
}
static final <R extends Record> Table<R> aliased(Table<R> table) {
if (table instanceof TableImpl)
return ((TableImpl<R>) table).getAliasedTable();
else if (table instanceof TableAlias)
return ((TableAlias<R>) table).getAliasedTable();
else
return null;
}
}