Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make:migration does not detect database changes on make:entity ManyToMany relation #504

Closed
quentint opened this issue Nov 26, 2019 · 6 comments

Comments

@quentint
Copy link

Hey all,
I generated a Purchase entity and a Game one with make:entity. I then added a games ManyToMany relation on Purchase (also using make:entity).

I then ran make:migration but got a surprising

[WARNING] No database changes were detected.

I tried adding a @ORM\JoinTable annotation on private $games; but the result remained the same.

Not sure what to do next, and how to generate a migration class. Anyone also experienced this?

@deivid11
Copy link

I'm having a similar problem after updating symfony to 4.3.8, have you tried removing cache?

@quentint
Copy link
Author

quentint commented Nov 26, 2019 via email

@deivid11
Copy link

@quentint It looks like this is a doctrine bug symfony/recipes#688

@dmaicher
Copy link

Yes this is currently an issue with wrongly configured caches on DoctrineBundle. We are working on a fix.

See doctrine/DoctrineBundle#1073

@quentint
Copy link
Author

quentint commented Nov 26, 2019 via email

@quentint
Copy link
Author

I can confirm that calling doctrine:cache:clear-metadata before make:migration fixes the issue. But oddly enough, it displays that message:

[ERROR] No cache entries were deleted.

Working anyway 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants