Last active
December 24, 2015 07:39
-
-
Save pdrosos/6764963 to your computer and use it in GitHub Desktop.
One-To-Many, Self-referencing association with Typo3 Flow and Doctrine 2
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 My\Package\Domain\Model; | |
use TYPO3\Flow\Annotations as Flow; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @Flow\Entity | |
*/ | |
class Task { | |
/** | |
* @var \Doctrine\Common\Collections\ArrayCollection<\My\Package\Domain\Model\Task> | |
* @ORM\OneToMany(mappedBy="parentTask") | |
**/ | |
protected $relatedTasks; | |
/** | |
* @var \My\Package\Domain\Model\Task | |
* @ORM\ManyToOne(inversedBy="relatedTasks") | |
**/ | |
protected $parentTask; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment