Created
June 8, 2011 11:10
-
-
Save merk/1014217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Test\AppBundle\Entity; | |
use FOS\CommentBundle\Entity\Comment as BaseComment; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="test_comment") | |
* @author Tim Nagel <[email protected]> | |
*/ | |
class Comment extends BaseComment | |
{ | |
/** | |
* Comment id. | |
* | |
* @ORM\Id | |
* @ORM\Column(type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* The comments parent. | |
* | |
* @orm:ManyToOne(targetEntity="Comment", inversedBy="children") | |
* @var Comment | |
*/ | |
protected $parent; | |
/** | |
* The comment children. | |
* | |
* @orm:OneToMany(targetEntity="Comment", mappedBy="parent") | |
* @var array of Comment | |
*/ | |
protected $children; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment