Tuesday, 10 September 2013

Doctrine 2 - Mapping multiple inheritance type from a single Entity

Doctrine 2 - Mapping multiple inheritance type from a single Entity

It's possible to set a multiple inheritance type from a single Entity?
I have this Entity
namespace Oilproject\ContentBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="type", type="integer")
* @ORM\DiscriminatorMap({"5" = "ContentAnswer"})
* @ORM\HasLifecycleCallbacks
* @ORM\Table(name="content")
*/
class Content
{
//My attributes
}
and i want to extend this Entity with another Entity but with "JOIN"
inheritance type. It's possible?

No comments:

Post a Comment