这是一个Doctrine架构:
Device:
columns:
name: { type: string(60), }
os_version_id: { type: int(11), notnull: false }
relations:
OsVersion:
foreignAlias: Devices
OsVersion:
columns:
version: { type: string(60), fixed: false, notnull: true }
这是一个夹具:
OSV_ABCD:
version: ABCD
OSV_DEFG:
version: DEFG
Device:
Device_1:
name: 'My device'
OsVersion: null
加载此灯具时,我得到了这个:
Invalid row key specified: (os_version) , referred to in (device) Device_1
如果我将OsVersion: null
更改为OsVersion: OSV_ABCD
,则会毫无问题地加载{{1}}。
答案 0 :(得分:0)
省略外键行完全有效:
Device:
Device_1:
name: 'My device'