mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-18 05:10:07 -07:00
27 lines
670 B
PHP
27 lines
670 B
PHP
<?php
|
|
|
|
namespace AppBundle\Repository;
|
|
|
|
use AppBundle\Entity\Part;
|
|
|
|
/**
|
|
* BuildingSetRepository.
|
|
*
|
|
* This class was generated by the Doctrine ORM. Add your own custom
|
|
* repository methods below.
|
|
*/
|
|
class BuildingKitRepository extends \Doctrine\ORM\EntityRepository
|
|
{
|
|
public function findAllByPart(Part $part)
|
|
{
|
|
$qb = $this->getEntityManager()->createQueryBuilder();
|
|
|
|
$qb->select('building_kit')
|
|
->from('AppBundle:BuildingKit', 'building_kit')
|
|
->innerJoin('building_kit.parts', 'parts')
|
|
->where('parts.part = :id')->setParameter('id', $part->getId());
|
|
|
|
return $qb->getQuery()->getResult();
|
|
}
|
|
}
|