Category: doctrine-orm

Discriminator column : Class has no field or association named type

I have a class contract that contains the abstract attribute contractInfo Type /** * @var ContractInfoType|null * * @ORMOneToOne(targetEntity=”ContractInfoType”, cascade={“persist”}) * @ORMJoinColumn(name=”contract_info_type_id”, referencedColumnName=”id”, nullable=true) */ private $contractInfoType; ContractInfoType is an abstract entity : ContractInfoPro and ContractInfoAsso inherit from them /**…

Single id is not allowed on composite primary key in entity AdminBundleEntityComptable

I created a simple entity with primary key id and when I try to generate my entity, I get this error : [DoctrineORMMappingMappingException] Single id is not allowed on composite primary key in entity AdminBundleEntityComptable Here is the entity that…

doctrine:migrations:migrate : SQLSTATE[42000]: Syntax error or access violation: 1064

I am trying to migrate my database in production (MySQL 5.6) with command: php bin/console doctrine:migrations:migrate I put this in Doctrine.yalm: doctrine: dbal: url: ‘%env(resolve:DATABASE_URL)%’ driver: ‘pdo_mysql’ server_version: ‘5.6’ I don’t know why I have error messages: Migration 20200426103129 failed…