ModelBundle/Repository/RepositoryTrait/UseTrackableTrait.php
public function findByUsedInEntity($entityId, $entityType)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('useReferences.' . $entityType . '.' . $entityId)->exists('true');

        return $qb->getQuery()->execute();
    }
public function findByUsedInEntity($entityId, $entityType)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('useReferences.' . $entityType . '.' . $entityId)->exists('true');

        return $qb->getQuery()->execute();
    }
public function findByUsedInEntity ( $ entityId , $ entityType ) { $ qb = $ this -> createQueryBuilder ( ) ; $ qb -> field ( 'useReferences.' . $ entityType . '.' . $ entityId ) -> exists ( 'true' ) ; return $ qb -> getQuery ( ) -> execute ( ) ; }
@param string $entityId
@param string $entityType

@return array
@param string $entityId @param string $entityType