Skip to content

Instantly share code, notes, and snippets.

@PhazeonPhoenix
Created March 9, 2012 19:24
Show Gist options
  • Save PhazeonPhoenix/2008204 to your computer and use it in GitHub Desktop.
Save PhazeonPhoenix/2008204 to your computer and use it in GitHub Desktop.
Symfony: ORM Entity (Doctrine)
<?php
namespace Acme\DemoBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="my_entity")
*/
class MyEntity
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
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