public function setName($name) { $this->name = $name; }
public function createProduct() { $product = new ECommerceProduct(); $product->setName('Doctrine Cookbook'); $this->_em->persist($product); $this->_em->flush(); $this->_em->clear(); return $product->getId(); }