code: @SuppressWarnings("unchecked")
      protected List<Expression<?>> getIdentifierColumns(List<JoinExpression> joins, boolean alias) {
          if (joins.size() == 1) {
              JoinExpression join = joins.get(0);
              if (join.getTarget() instanceof RelationalPath) {
                  return ((RelationalPath) join.getTarget()).getColumns();
              } else {
                  return Collections.emptyList();
              }
  
          } else {
              List<Expression<?>> rv = Lists.newArrayList();
              int counter = 0;
              for (JoinExpression join : joins) {
                  if (join.getTarget() instanceof RelationalPath) {
                      RelationalPath path = (RelationalPath) join.getTarget();
                      List<Expression<?>> columns;
                      if (path.getPrimaryKey() != null) {
                          columns = path.getPrimaryKey().getLocalColumns();
                      } else {
                          columns = path.getColumns();
                      }
                      if (alias) {
                          for (Expression<?> column : columns) {
                              rv.add(ExpressionUtils.as(column, "col" + (++counter)));
                          }
                      } else {
                          rv.addAll(columns);
                      }
  
                  } else {
                      // not able to provide a distinct list of columns
                      return Collections.emptyList();
                  }
              }
              return rv;
          }
  
      }
docs: Return a list of expressions that can be used to uniquely define the query sources
  
  @param joins
  @return identifier columns