【发布时间】:2011-11-15 10:41:29
【问题描述】:
我有以下字段的表格:
father_id child_id
它们都应该指向表“sfGuardUser”。我正在尝试在我的架构文件中定义这种关系,如下所示:
UsersHierarchy:
tableName: users_hierarchy
columns:
father_id: {type: integer(9), primary: true}
child_id: {type: integer(9), primary: true}
relations:
sfGuardUser:
local: father_id
foreign: id
sfGuardUser:
local: child_id
foreign: id
但结果只有一列与 sfGuardUser 表相关。所以问题是如何让两个列指向 sfGuardUser 表中的同一列?
【问题讨论】:
标签: symfony1 doctrine schema yaml