public function findByIdentifierColumn(
        FamilyInterface $family,
        $identifierColumn,
        $reference,
        $partialLoad = false
    ) {
        if (!$partialLoad) {
            return $this->findOneBy(
                [
                    $identifierColumn => $reference,
                    'family' => $family,
                ]
            );
        }

        $qb = $this->createQueryBuilder('e')
            ->where("e.{$identifierColumn} = :reference")
            ->andWhere('e.family = :familyCode')
            ->setParameters(
                [
                    'reference' => $reference,
                    'familyCode' => $family->getCode(),
                ]
            );

        return $this->executeWithPartialLoad($qb);
    }
public function findByIdentifierColumn(
        FamilyInterface $family,
        $identifierColumn,
        $reference,
        $partialLoad = false
    ) {
        if (!$partialLoad) {
            return $this->findOneBy(
                [
                    $identifierColumn => $reference,
                    'family' => $family,
                ]
            );
        }

        $qb = $this->createQueryBuilder('e')
            ->where("e.{$identifierColumn} = :reference")
            ->andWhere('e.family = :familyCode')
            ->setParameters(
                [
                    'reference' => $reference,
                    'familyCode' => $family->getCode(),
                ]
            );

        return $this->executeWithPartialLoad($qb);
    }
public function findByIdentifierColumn ( FamilyInterface $ family , $ identifierColumn , $ reference , $ partialLoad = false ) { if ( ! $ partialLoad ) { return $ this -> findOneBy ( [ $ identifierColumn => $ reference , 'family' => $ family , ] ) ; } $ qb = $ this -> createQueryBuilder ( 'e' ) -> where ( "e.{$identifierColumn} = :reference" ) -> andWhere ( 'e.family = :familyCode' ) -> setParameters ( [ 'reference' => $ reference , 'familyCode' => $ family -> getCode ( ) , ] ) ; return $ this -> executeWithPartialLoad ( $ qb ) ; }
Find data based on a identifier column present in the Data entity

@param FamilyInterface $family
@param string          $identifierColumn
@param int|string      $reference
@param bool            $partialLoad

@throws ORMException

@return DataInterface|Proxy|null
Find data based on a identifier column present in the Data entity