it fixes the issue Have you checked the docs? You can define a primary key by using the @ORM\Id annotation. In case the value is generated automatically (e.g. if using auto_increment), you also need to set the @ORM\GeneratedValue(strategy="IDENTITY") annotation.
Doctrine Table Inheritance - No identifier/primary key specified for Entity
Hope that helps What I try to do is to have two classes User in one file and Video in another. My task is to do database where user have to login and after that he can upload video. The video have entity $uploaded_by and there should go $id from the User class. , try to change this:
fixed the issue. Will look into that further the subkey entity: tells the security component to use doctrine to fetch a User entity from the database, which doesn't really work if you don't use the database to store users. the security component is also made to check if a user - which is logged in - might have changed between requests. So you user most likely will also be logged out regularly. for all the details have a look at https://symfony.com/doc/current/security/user_provider.html . maybe you can come up with a custom user provider that stores the user information in some temporary directory for a while or something ...