Last active
April 15, 2017 21:00
-
-
Save Digi92/2cbc284686b7104cd3611a72b2bf1230 to your computer and use it in GitHub Desktop.
Doctrine Example ID Field Annotation Configuration
This file contains hidden or 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 AppBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| /** | |
| * Class Example | |
| * @package AppBundle\Entity | |
| * @ORM\Entity | |
| * @ORM\Table(name="example") | |
| */ | |
| class Example { | |
| /** | |
| * @ORM\Column(type="integer") | |
| * @ORM\Id | |
| * @ORM\GeneratedValue(strategy="AUTO") | |
| * @var integer | |
| */ | |
| private $id; | |
| /** | |
| * Get id | |
| * | |
| * @return integer | |
| */ | |
| public function getId() | |
| { | |
| return $this->id; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment