app/src/main/java/db/juhaku/juhakudb/filter/QueryProcessor.java
/**
     * Alter the select statement with fetch joins. This is to create more fluent select statements
     * that can return multiple tables with a single query.
     *
     * @param root {@link Root} where to create query from.
     * @param sql {@link StringBuilder} containing current sql.
     *
     * @since 1.2.0
     *
     * @hide
     */
Alter the select statement with fetch joins. This is to create more fluent select statements
that can return multiple tables with a single query.

@param root  Root where to create query from.
@param sql  StringBuilder containing current sql.



@hide
Alter the select statement with fetch joins . This is to create more fluent select statements that can return multiple tables with a single query . @param root Root where to create query from . @param sql StringBuilder containing current sql . @hide
private void alterSelect(Root<?> root, StringBuilder sql) {
        for (Root r : root.getJoins()) {
            Join join = (Join) r;
            if (join.isFetch()) {
                sql.append(", ");
                sql.append(generateSelectForModel(join.getModel(), Alias.forJoin(join)));
            }
            if (!root.getJoins().isEmpty()) {
                alterSelect(join, sql);
            }
        }
    }
private void alterSelect ( Root < ? > root , StringBuilder sql ) { for ( Root r : root . getJoins ( ) ) { Join join = ( Join ) r ; if ( join . isFetch ( ) ) { sql . append ( ", " ) ; sql . append ( generateSelectForModel ( join . getModel ( ) , Alias . forJoin ( join ) ) ) ; } if ( ! root . getJoins ( ) . isEmpty ( ) ) { alterSelect ( join , sql ) ; } } }
Alter the select statement with fetch joins.
Alter the select statement with fetch joins .