HHH-13496 Extract repeated block from loop

This commit is contained in:
Sanne Grinovero 2019-07-05 16:13:06 +01:00
parent f8bd799544
commit 99ae7c94e3
1 changed files with 2 additions and 1 deletions

View File

@ -341,10 +341,11 @@ public class FromElement extends HqlSqlWalkerNode implements DisplayableNode, Pa
final String[] propertyNames = getIdentifierPropertyNames();
List<String> columns = new ArrayList<>();
final boolean inSelect = getWalker().getStatementType() == HqlSqlTokenTypes.SELECT;
for ( int i = 0; i < propertyNames.length; i++ ) {
String[] propertyNameColumns = toColumns(
table, propertyNames[i],
getWalker().getStatementType() == HqlSqlTokenTypes.SELECT
inSelect
);
for ( int j = 0; j < propertyNameColumns.length; j++ ) {
columns.add( propertyNameColumns[j] );