Agone
Agone

Reputation: 71

How to clear my Symfony project of a deleted entity?

I created an entity "Publishers" with coupls relations.

I wanted to remove this entity and anything related to it. And I have been told to delete the Entity file and Migration file.

Now when I run my website I get the following message :

The target-entity App\Entity\Publisher cannot be found in 'App\Entity\Games#publishers'.

How can I fix this and "clear" everything that was related to this entity ?

Upvotes: 2

Views: 360

Answers (1)

alvery
alvery

Reputation: 1983

You have to clear your metadata cache:

./bin/console doctrine:cache:clear-metadata

Doctrine stores this cache using one of the cache drivers: https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/caching.html#metadata-cache. So it could be different from filesystem cache stored in folder.

Upvotes: 1

Related Questions