Created
December 1, 2011 11:37
-
-
Save haswalt/1416066 to your computer and use it in GitHub Desktop.
Subclass from Mapped superclass example
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 UKWM\Bundle\DictionaryBundle\Entity; | |
use \Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="dictionary_colours", indexes={ | |
* @ORM\Index(name="text_idx", columns={"text"}) | |
* }) | |
*/ | |
class Colour extends Definition | |
{ | |
/** | |
* @ORM\Id | |
* @ORM\Column(type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* @ORM\Column(type="string", length="255") | |
*/ | |
protected $text; | |
/** | |
* @ORM\ManyToOne(targetEntity="Definition", inversedBy="alternatives") | |
* @ORM\JoinColumn(name="definition_id", referencedColumnName="id") | |
*/ | |
protected $alternatives; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment