Unlock this challenge:
Check out these two Doctrine queries that live inside CategoryRepository:
CategoryRepository
$this->createQueryBuilder('category') $this->createQueryBuilder('category')->select('category')
What is the difference between them?
The second will error because you've already used the category alias.
category
The second will only select the id of every category
id
The first one will error because we're not selecting anything!
Both queries will return the same thing: Category objects.