Doctrine Query Builder nested orX and andX conditions with join
问题 I have two entities User and CalendarEvent . My users are attached to a factory, and calendarEvent can be used to know if a user is "loaned" to a different factory of the one he belongs to... My two entities are like this : User : class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var string * @ORM\Column(name="firstname", type="string", length=255, nullable=true) */ private $firstname; /** * @var string *