lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
protected function getJoinSQLForAssociation(AssociationMetadata $association)
    {
        if (! $association->isOwningSide()) {
            return 'LEFT JOIN';
        }

        // if one of the join columns is nullable, return left join
        foreach ($association->getJoinColumns() as $joinColumn) {
            if (! $joinColumn->isNullable()) {
                continue;
            }

            return 'LEFT JOIN';
        }

        return 'INNER JOIN';
    }
protected function getJoinSQLForAssociation(AssociationMetadata $association)
    {
        if (! $association->isOwningSide()) {
            return 'LEFT JOIN';
        }

        // if one of the join columns is nullable, return left join
        foreach ($association->getJoinColumns() as $joinColumn) {
            if (! $joinColumn->isNullable()) {
                continue;
            }

            return 'LEFT JOIN';
        }

        return 'INNER JOIN';
    }
protected function getJoinSQLForAssociation ( AssociationMetadata $ association ) { if ( ! $ association -> isOwningSide ( ) ) { return 'LEFT JOIN' ; } // if one of the join columns is nullable, return left join foreach ( $ association -> getJoinColumns ( ) as $ joinColumn ) { if ( ! $ joinColumn -> isNullable ( ) ) { continue ; } return 'LEFT JOIN' ; } return 'INNER JOIN' ; }
Generates the appropriate join SQL for the given association.

@return string LEFT JOIN if one of the columns is nullable, INNER JOIN otherwise.
Generates the appropriate join SQL for the given association .