diff --git a/docs/lists/ch05/05-05.txt b/docs/lists/ch05/05-05.txt new file mode 100644 index 0000000..74dcb6d --- /dev/null +++ b/docs/lists/ch05/05-05.txt @@ -0,0 +1,15 @@ +/** + * BlogArticle + * + * @ORM\Table(name="blog_article") + * @ORM\Entity(repositoryClass="AppBundle\Entity\BlogArticleRepository") + */ +class BlogArticle +{ + ... + /** + * @var \DateTime + * + * @ORM\Column(name="target_date", type="date") + */ + private $targetDate; diff --git a/src/AppBundle/Entity/BlogArticle.php b/src/AppBundle/Entity/BlogArticle.php index 8ba5bde..75636c3 100644 --- a/src/AppBundle/Entity/BlogArticle.php +++ b/src/AppBundle/Entity/BlogArticle.php @@ -7,7 +7,7 @@ /** * BlogArticle * - * @ORM\Table() + * @ORM\Table(name="blog_article") * @ORM\Entity(repositoryClass="AppBundle\Entity\BlogArticleRepository") */ class BlogArticle @@ -31,7 +31,7 @@ class BlogArticle /** * @var \DateTime * - * @ORM\Column(name="targetDate", type="date") + * @ORM\Column(name="target_date", type="date") */ private $targetDate;