关系

问题描述:

我有以下的schema.yml关系

Person: 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    joomla_user_id: { type: integer(4), notnull: false, unique: true } 
    name: { type: string(100), notnull: true } 
    email: { type: string(200), notnull: true } 
    organisation_id: { type: integer(4), notnull: false } 
    position: { type: string(100), notnull: false } 
    phone: { type: string(25), notnull: false } 
    afterhours: { type: string(100), notnull: false } 
    mobile: { type: string(100), notnull: false } 
    profile_photo_url: { type: string(250), notnull: false } 
    profile_short: { type: string(2500), notnull: false } 
    profile_long: { type: clob (16000000), notnull: false } 
    link1_type: { type: string(255), notnull: false} 
    link1: { type: string(255), notnull: false } 
    link2_type: { type: string(255), notnull: false} 
    link2: { type: string(255), notnull: false } 
    link3_type: { type: string(255), notnull: false } 
    link3: { type: string(255), notnull: false } 
    link4_type: { type: string(255), notnull: false } 
    link4: { type: string(255), notnull: false } 
    fax: { type: string(100), notnull: false } 
    address: { type: string(255), notnull: false } 
    region_id: { type: integer(4), notnull: true } 
    notes: { type: clob(16777777), notnull: false } 

    relations: 
    Organisation: { local: organisation_id } 
    IndustryGroups: { class: IndustryGroup, refClass: PersonIndustryGroup, local: person_id, foreign: industry_group_id } 
    Region: { local: region_id } 
    RegionServiced: { class: PersonRegionList,refClass: PersonRegion, local: person_id, foreign: region_id } 
    EmailLists: { class: EmailList, refClass: PersonEmailList, local: person_id, foreign: email_list_id } 
    CategoryTags: { class: CategoryTag, refClass: PersonCategoryTag, local: person_id, foreign: category_tag_id } 
    JoomlaUser: { class: JosUser, local: joomla_user_id } 
    CertifiedProfessional: { class: CertifiedProfessional, local: id, foreign: person_id } 

PersonRegion: 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    person_id: { type: integer(4), notnull: true } 
    region_id: { type: integer(4), notnull: true } 
    relations: 
    Person: 
     class: Person 
     local: person_id 
     onDelete: CASCADE 
    Region: 
     class: Region 
     local: region_id 
     onDelete: RESTRICT 

PersonIndustryGroup: 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    person_id: { type: integer(4), notnull: true } 
    industry_group_id: { type: integer(4), notnull: true } 
    relations: 
    Person: 
     class: Person 
     local: person_id 
     onDelete: CASCADE 
    IndustryGroup: 
     class: IndustryGroup 
     local: industry_group_id 
     onDelete: RESTRICT 

IndustryGroup: 
    actAs: 
    Sortable: ~ 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    name: { type: string(100), notnull: true } 

PersonEmailList: 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    person_id: { type: integer(4), notnull: true } 
    email_list_id: { type: integer(4), notnull: true } 
    relations: 
    Person: 
     class: Person 
     local: person_id 
     onDelete: CASCADE 
    EmailList: 
     class: EmailList 
     local: email_list_id 
     onDelete: RESTRICT 

EmailList: 
    actAs: 
    Sortable: ~ 
    columns: 
    id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } 
    name: { type: string(100), notnull: true } 
    mailchimp_name: { type: string(100), notnull: true } 
    on_signup: { type: boolean } 
    member_only: { type: boolean } 

我最近增加了RegionServiced关系 - 这是正在为在BasePersonForm.class.php

产生什么唯一的关系当我运行./symfony doctrine:build --forms --filters --model 时,没有错误消息,但没有我期望的person_region_list小部件。

尝试改变class选项:

relations: 
[..] 
    RegionServiced: { class: Region, refClass: PersonRegion, local: person_id, foreign: region_id } 
[..]