Answer the question
In order to leave comments, you need to log in
How to generate migrations on entity outside src/Entity?
Usually, entities are located in src/Entity, and when executing the command: php bin/console make:migration
Symphony analyzes entities and generates migrations based on them.
My entities are in:
src/Models/User/Entity
and the symphony does not see them. What should be done?
Answer the question
In order to leave comments, you need to log in
You need to add mapping in /config/doctrine.yml settings (well, or in the file where these settings are):
For version 4: https://github.com/symfony/demo/blob/master/config...
doctrine:
orm:
mappings:
UserEntities:
type: annotation
dir: "%kernel.root_dir%/../src/Models/User/Entity"
is_bundle: false
prefix: <YOUR_NAMESPACE>\Models\User\Entity
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question