[英]PHP Doctrine: Custom nested set?
Is it possible to have nested set capabilities in this somewhat custom setup? 在这种稍微自定义的设置中是否可以具有嵌套设置功能?
Consider these 4 tables: 考虑以下4个表:
- Object : (
oid
,name
) contains: [1, 'Licence'] and [2, 'Exemption'] 对象 :(oid
,name
)包含:[1,'Licence']和[2,'Exemption']- Licence : (
lid
,name
) 执照 :(lid
,name
)- Exemption : (
eid
,name
) 豁免 :(eid
,name
)- Cost : (
oid
,oid_ref
,cost_oid
,cost_oid_ref
) 费用 :(oid
,oid_ref
,cost_oid
,cost_oid_ref
)
For: 对于:
P = Licence with lid
[1] P = lid
牌照[1]
R = Exemption with eid
[2] R =具有eid
豁免[2]
i can say "object P is a parent to object R " if the following Cost record exists: 如果存在以下成本记录,我可以说“对象P是对象R的父对象”:
[oid: 2 oid_ref: 2 cost_oid: 1 cost_oid_ref: 1]
I understand that this creates somesort of 'conditional foreign key' relation which I need to define in code. 我知道这会创建某种“条件外键”关系,需要在代码中进行定义。 Is it possible to have the nested set loaded with these conditions? 嵌套集是否可以加载这些条件?
我正在尝试使用column_aggregation继承进行某种方式,但是我有一种直觉,认为它行不通...:S
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.