0

I have some queries which cross repositories in ATG. I am not aware of a way to link repositories together in order to provide data from one repository to the other. The queries do have some complicity to them such that trying to build them by hand will take a lot of lines of code.

So my thought is that I could just create a view with the query and then attach the repository definition to it. But, what would be the table name that would be required to use based on the DTD for the repository xml file?

Thanks

4

2 回答 2

2

不确定这是否是您要查找的内容,但可以在 ATG 中链接存储库。一个存储库中的存储库项目的属性可以引用不同存储库中的另一个存储库项目。手册中的示例是:

<table name="employees" id-column-names="id">
  <property name="work_address"
             item-type="workAddress"
             repository="/atg/userprofiling/LDAPRepository"/>
</table>

您需要添加的唯一属性是“存储库”属性,它是指向您要链接到的项目所在的存储库组件的核心路径。现在查询“员工”地址不应该是这么费力的查询。

于 2011-02-02T13:48:34.090 回答
1

您提供的表名应该只是视图名。确保并将其标记为只读,假设您的视图设计为只读,大多数都是只读的。一些数据库支持对视图进行写入操作,然后填充基础表,如果是这种情况,您还需要相应地使缓存无效,以确保您的用户看到适当的数据。

于 2010-11-22T14:35:00.683 回答