mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
No identifier/primary key specified for Entity with php 8 attributs #6740
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheKassaK on GitHub (Jun 1, 2021).
Hi,
I tried to update an entity with orm php 8 attributes, like :
But when I doctrine:schema:update I have this error :
No identifier/primary key specified for Entity "App\Entity\XXXXX". Every Entity must have an identifier/primary key.
What is the problem ?
Edit :
In doctrine.yaml, if I switch from type: annotation to type: attribute I have this error :
The service "doctrine.orm.default_attribute_metadata_driver" has a dependen
!! cy on a non-existent parameter "doctrine.orm.metadata.attribute.class". Did
!! you mean one of these: "doctrine.orm.metadata.driver_chain.class", "doctri
!! ne.orm.metadata.annotation.class", "doctrine.orm.metadata.xml.class", "doct
!! rine.orm.metadata.yml.class", "doctrine.orm.metadata.php.class", "doctrine.
!! orm.metadata.staticphp.class", "doctrine.orm.validator.unique.class"?
@beberlei commented on GitHub (Jun 2, 2021):
It seems that you do not have DoctrineBundle version 2.4-dev installed? Thats currently required for
type: attributeto work.