ARTICLE AD BOX
In Symfony 5, I'm trying to add a new Entity with a relation in it but I think I don't use the command like I should...
When I want to create an Entity I do this:
$ bin/console m:e myNewEntityThen, I add my property and its type:
New property name (press <return> to stop adding fields): > myProperty Field type (enter ? to see all types) [string]: > relation relationAnd when it asks to me to which Entity should it be related to, and I write the entity path I have an error:
Compile Error: Cannot declare class App\Entity\myOtherEntity, because the name is already in use
But I don't understand this error because, indeed this entity already exists, it's the one I want to link to the property.
Well, maybe I misunderstand the utility of this input but, for me, it's used to link the property to another entity, like a FK in a database.
So, please help, it's not the first time I encounter this problem and I never know how to correct it.
Every time it happens to me, I declare the property's relation by hand...
Thanks in advance!
