Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / CMS / CmsComment.php
1 <?php
2
3 namespace Doctrine\Tests\Models\CMS;
4
5 /**
6  * @Entity
7  * @Table(name="cms_comments")
8  */
9 class CmsComment
10 {
11     /**
12      * @Column(type="integer")
13      * @Id
14      * @GeneratedValue(strategy="AUTO")
15      */
16     public $id;
17     /**
18      * @Column(type="string", length=255)
19      */
20     public $topic;
21     /**
22      * @Column(type="string")
23      */
24     public $text;
25     /**
26      * @ManyToOne(targetEntity="CmsArticle", inversedBy="comments")
27      * @JoinColumn(name="article_id", referencedColumnName="id")
28      */
29     public $article;
30
31     public function setArticle(CmsArticle $article) {
32         $this->article = $article;
33     }
34
35     public function __toString() {
36         return __CLASS__."[id=".$this->id."]";
37     }
38 }