0
내가 YAML 매핑심포니 4 교리 YAML은
를 사용 mappng 그리고는 "PHP 빈/콘솔 교리 : 생성 : 엔티티 앱 --no-백업"때 얻을 오류를 앱 \ "에 대한 기본 경로를 찾을 수 없습니다" 엔티티 \ 사용자 ","
doctrine.yaml
doctrine:
dbal:
# configure these for your database server
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
# With Symfony 3.3, remove the `resolve:` prefix
url: '%env(resolve:DATABASE_URL)%'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
App:
is_bundle: false
type: 'yml'
dir: '%kernel.project_dir%/config/doctrine'
prefix: 'App\Entity'
alias: 'App'
샘플 User.orm.yml :이 명령이 제공
App\Entity\User:
type: entity
table: tbl_user
repositoryClass: App\Entity\UserRepository
fields:
username:
type: string
length: 40
nullable: true
password:
type: string
length: 40
nullable: true
yaml에서 생성하고 데이터베이스 테이블을 변경해야합니다. – KILLER