You can use Doctrine expression API for subqueries.
Example for your query:
you should put following code to Doctrine repository of your articulo entity
$codigo = '4060981104537';
$qb = $this->createQueryBuilder('a');
$qb->where(
$qb->expr()->in(
'a.descripcion',
$this->createQueryBuilder('a2')
->select('a2.descripcion')
->where('a2.codigo LIKE :codigo')
->setParameter('codigo', $codigo)
->getDQL()
)
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…