i use two classes:
namespace Test;
use Doctrine\ORM\Mapping as ORM;
/**
*@Table()
*@InheritanceType("Joined")
*@DiscriminatorMap({"baseclass"="BaseClass", "subclass"="SubClass"}
*@Entity
*/
class BaseClass{
/**
*@Column(name="id", type="integer")
*@Id
*@GeneratedValue(strategy="IDENTITY")
*/
private $id;
}
namespace Test;
use Doctrine\ORM\Mapping as ORM;
/**
*@Table()
*@Entity
*/
class SubClass extends BaseClass{
/**
* @Column(name="v", type="string", nullable="false")
*/
private $v;
}
I am not able to persist a SubClassObject. I receive the following errorMessage:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'dtype' in 'field list'
I am new to Doctrine and ORM so I need some help here.
Edit: After using the cli orm:create-schema:tool the baseclass has a dtype-field. Is it possible to create the entity without that field and what does this field stand for?