_schemaTool->createSchema(array( $this->_em->getClassMetadata('Doctrine\Tests\Models\DDC1925\DDC1925User'), $this->_em->getClassMetadata('Doctrine\Tests\Models\DDC1925\DDC1925Product'), )); //} catch(\Exception $e) { //} } public function testIssue() { $user = new DDC1925User(); $user->setTitle("Test User"); $this->_em->persist($user); $product = new DDC1925Product(); $product->setTitle("Test product"); $this->_em->persist($product); $this->_em->flush(); $product->addBuyer($user); $this->_em->getUnitOfWork()->computeChangeSets(); $this->_em->persist($product); $this->_em->flush(); } }