private function _createFixture() { $customer = new ECommerceCustomer(); $customer->setName('Luke Skywalker'); $mentor = new ECommerceCustomer(); $mentor->setName('Obi-wan Kenobi'); $customer->setMentor($mentor); $this->_em->persist($customer); $this->_em->flush(); $this->_em->clear(); }