From 1aad39d80d290c1d4f9281ee5f505ea68e23ec9b Mon Sep 17 00:00:00 2001 From: Gus Date: Thu, 20 Nov 2014 12:49:22 -0500 Subject: [PATCH] SetDescription required on Product entities Doctrine sets columns to NOT NULL by default. The code in the example throws an exception without the fix. --- book/doctrine.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/book/doctrine.rst b/book/doctrine.rst index 871695ff21d..e1f66134ed4 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -1105,6 +1105,7 @@ Now you can see this new code in action! Imagine you're inside a controller:: $product = new Product(); $product->setName('Foo'); $product->setPrice(19.99); + $product->setDescription('Lorem ipsum dolor'); // relate this product to the category $product->setCategory($category);