Created
July 9, 2012 09:29
-
-
Save beberlei/3075331 to your computer and use it in GitHub Desktop.
Customize Trait Doctrine Mappings with AttributeOverride
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 MyBundle\Entity; | |
use Doctrine\ORM\Mapping AS ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\AttributeOverrides({ | |
* @ORM\AttributeOverride(name="id", column=@ORM\Column(name="table_id")) | |
* }) | |
*/ | |
class User | |
{ | |
use UserTrait; | |
} |
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 MyBundle\Entity; | |
use Doctrine\ORM\Mapping AS ORM; | |
trait UserTrait | |
{ | |
/** | |
* @ORM\Column(type="integer") | |
*/ | |
private $id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment