src/Utils/FindOptionsUtils.js
/**
     * Joins eager relations for a given entity.
     *
     * @param {SelectQueryBuilder} qb
     * @param {string} alias
     * @param {EntityMetadata} metadata
     * @param {Set<RelationMetadata>} visited
     */
Joins eager relations for a given entity.
Joins eager relations for a given entity .
static joinEagerRelations(qb, alias, metadata, visited = new Set()) {
        metadata.eagerRelations.forEach(relation => {
            if (visited.has(relation)) {
                return;
            }
            visited.add(relation);
            if (relation.inverseRelation) {
                visited.add(relation.inverseRelation);
            }
            const relationAlias = alias + '_' + relation.propertyPath.replace('.', '_');
            qb.leftJoinAndSelect(alias + '.' + relation.propertyPath, relationAlias);
            __self.joinEagerRelations(qb, relationAlias, relation.inverseEntityMetadata, visited);
        });
    }
static joinEagerRelations ( qb , alias , metadata , visited = new Set ( ) ) { metadata . eagerRelations . forEach ( relation => { if ( visited . has ( relation ) ) { return ; } visited . add ( relation ) ; if ( relation . inverseRelation ) { visited . add ( relation . inverseRelation ) ; } const relationAlias = alias + '_' + relation . propertyPath . replace ( '.' , '_' ) ; qb . leftJoinAndSelect ( alias + '.' + relation . propertyPath , relationAlias ) ; __self . joinEagerRelations ( qb , relationAlias , relation . inverseEntityMetadata , visited ) ; } ) ; }
Joins eager relations for a given entity.
Joins eager relations for a given entity .