Answer the question
In order to leave comments, you need to log in
How to create an entity in a non-standard way?
Hello, there are such orm settings in -
orm:
auto_generate_proxy_classes: "%kernel.debug%"
# default_entity_manager: oracle_db
entity_managers:
oracle_db:
connection: oracle_db
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Common/Entity'
prefix: 'App\Common\Entity'
alias: App\Common
OracleDB:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/OracleDB/Entity'
prefix: 'App\OracleDB\Entity'
alias: App\OracleDB
Cecs:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Cecs/Entity'
prefix: 'App\Cecs\Entity'
alias: App\Cecs
Answer the question
In order to leave comments, you need to log in
This is not possible
. As an option (if you still have all the entities in the Entity namespace, because it is hardcoded) - configure the bundle before each generation, and then return it back
maker:
root_namespace: 'App\Common'
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
AppСommon:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Common/Entity'
prefix: 'App\Common\Entity'
alias: AppСommon
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question