1
我試圖創建實體類。我正在使用Resources/config/doctrine文件夾中的yml文件。嘗試從yml配置文件創建實體時找不到實體類
Category.orm.yml
Marek\JobeetBundle\Entity\Category:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: IDENTITY
name:
type: string
length: '255'
unique: true
manyToMany:
affiliates:
targetEntity: Marek\JobeetBundle\Entity\Affiliate
joinTable:
name: CategoryAffiliate
joinColumns:
category_id:
referencedColumnName: id
inverseJoinColumns:
affiliate_id:
referencedColumnName: id
lifecycleCallbacks: { }
Affilate.orm.yml
Marek\JobeetBundle\Entity\Affiliate:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: IDENTITY
url:
type: string
length: '255'
nullable: true
email:
type: string
length: '255'
nullable: true
unique: true
token:
type: string
length: '255'
isActive:
type: boolean
nullable: false
column: is_active
default: 0
createdAt:
type: datetime
column: created_at
gedmo:
timestampable:
on: create
manyToMany:
categories:
targetEntity: Marek\JobeetBundle\Entity\Category
mappedBy: affiliates
lifecycleCallbacks: { }
工作:
Marek\JobeetBundle\Entity\Job:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: IDENTITY
type:
type: string
length: '255'
company:
type: string
length: '255'
nullable: true
logo:
type: string
length: '255'
url:
type: string
length: '255'
nullable: true
position:
type: string
length: '255'
nullable: true
location:
type: string
length: '255'
description:
type: string
length: '4000'
howToApply:
type: string
length: '4000'
column: how_to_apply
token:
type: string
length: '255'
unique: true
isPublic:
type: boolean
length: null
column: is_public
isActivated:
type: boolean
length: null
column: is_activated
email:
type: string
length: '255'
createdAt:
type: datetime
column: created_at
gedmo:
timestampable:
on: create
updatedAt:
type: datetime
column: updated_at
gedmo:
timestampable:
on: update
expiresAt:
type: datetime
column: expires_at
oneToOne:
category:
targetEntity: Marek\JobeetBundle\Entity\Category
cascade: { }
mappedBy: null
inversedBy: null
joinColumns:
category_id:
referencedColumnName: id
orphanRemoval: false
lifecycleCallbacks: { }
執行後:
PHP應用程序/控制檯學說:生成:實體JobeetBundle --path = 「SRC」
我越來越:
警告:class_parent():類馬立克\ JobeetBundle \實體\加盟 做不存在,並且不能在 供應商/ gedmo-學說擴展加載\ LIB \ gedmo \製圖\ ExtensionMetadataFactory.php 上線80
我知道,我還沒有,我想創建它們的任何實體。
有人可以幫忙嗎?