0
我期待創造燈具文件爲下面的模式(電影庫):的Symfony(教義):照明燈一個與自定義字段許多關係
VodProgram:
actAs: { Timestampable: ~ }
columns:
title: { type: string(255), notnull: true }
year: { type: smallint }
...
relations:
VodPersons:
class: VodPerson
refClass: VodCasting
local: program_id
foreign: person_id
foreignAlias: VodPrograms
VodPerson:
columns:
name: { type: string(255), notnull: true }
VodCasting:
columns:
program_id: { type: integer, primary: true }
person_id: { type: integer, primary: true }
role: { type: string(255) }
rank: { type: smallint }
relations:
VodProgram: { onDelete: CASCADE, local: program_id, foreign: id }
VodPerson: { onDelete: CASCADE, local: person_id, foreign: id }
我的問題是創造燈具與「角色文件「和」排名「字段出現在VodCasting表中。
這裏是我的實際燈具:
VodPerson:
kosinski:
name: Joseph Kosinski
VodProgram:
tron:
VodPersons: [kosinski] # where to put the role and rank infos ?
title: Tron
year: 2010
我想是這樣的:沒有運氣
VodProgram:
tron:
VodPersons:
kosinski:
rank: 1
title: Tron
...
。
有什麼建議嗎?
謝謝。
完美!謝謝 – liilo 2012-03-19 14:41:11