Instantly share code, notes, and snippets.
pengend
/ SocialBase.php
Created
August 23, 2016 14:24
— forked from Problematic/SocialBase.php
Working example of Symfony2 entities with Class Table Inheritance
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 UP\SocialBundle\Entity; | |
/** | |
* UP\SocialBundle\Entity\SocialBase | |
* @orm:Entity | |
* @orm:HasLifecycleCallbacks | |
* @orm:InheritanceType("JOINED") | |
* @orm:DiscriminatorColumn(name="class_name", type="string") |
pengend
/ SocialBase.php
Created
August 23, 2016 14:24
— forked from Problematic/SocialBase.php
Working example of Symfony2 entities with Class Table Inheritance
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 UP\SocialBundle\Entity; | |
/** | |
* UP\SocialBundle\Entity\SocialBase | |
* @orm:Entity | |
* @orm:HasLifecycleCallbacks | |
* @orm:InheritanceType("JOINED") | |
* @orm:DiscriminatorColumn(name="class_name", type="string") |