26
我在symfony项目中使用Doctrine 1.2, ,我正在考虑在架构中混合具体和列聚合继承类型: 列聚合让我可以在父表中进行查询并获取父母和孩子的记录,而具体的继承让我得到一个更干净的模式。 另外,混合将在同一个继承链中。 我该如何编写架构文件?像以下一样?同一架构中的不同继承类型
A:
B:
inheritance:
extends: A
type: concrete
C:
inheritance:
extends: B
type: column_aggregation
keyField: type
keyValue: 1
或者这样也许:
A:
B:
inheritance:
extends: A
type: concrete
C:
inheritance:
extends: B
type: concrete
D:
inheritance:
extends: C
type: column_aggregation
keyField: type
keyValue: 1
E:
inheritance:
extends: C
type: column_aggregation
keyField: type
keyValue: 2
是否有任何危险/警告?
貌似没有人有经验分享。我有兴趣知道这是怎么回事 - 我最初的想法是,它不会很好。 – benlumley 2011-01-14 08:34:08
@benlumley嗯,我们已经尝试过了,而且我们正在测试,现在看来它工作得很好。如果我们遇到一些问题,我会编辑我的文章并添加评论。我们尝试了第二个模式的版本。 – greg0ire 2011-01-14 08:42:56