Skip to content

Instantly share code, notes, and snippets.

@xabbuh
Created May 2, 2016 20:26
Show Gist options
  • Save xabbuh/e27dc47dae82b06eb6b8988404c61ef1 to your computer and use it in GitHub Desktop.
Save xabbuh/e27dc47dae82b06eb6b8988404c61ef1 to your computer and use it in GitHub Desktop.
public function findByProductId($id) {
return $this->createQueryBuilder('mc')
->join('mc.product', 'product')
->where('product.id = :id')
->setParameter('id', $id)
;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment