Skip to content

Instantly share code, notes, and snippets.

@bitwombat
Last active August 6, 2017 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitwombat/173f78c83028345a4477bfcf86ca5368 to your computer and use it in GitHub Desktop.
Save bitwombat/173f78c83028345a4477bfcf86ca5368 to your computer and use it in GitHub Desktop.
Different queries, same result. Any reason to care?
$qb ->from('Event e')
->where($qb->expr()->isMemberOf(':personId', 'e.peopleAttending'))
->setParameter('personId', 3)
;
$qb ->from('Event e')
->join('e.peopleAttending', 'p')
->where('p.id = :personId')
->setParameter('personId', 3)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment