开发者

how to represent a oracle view with in ATG Repository structure

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


Not sure if this is what you're looking for but it is possible to link repositories in ATG. A property from a repository item in one repository can reference another repository item in a different repository. The example in the manuals is:

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

The only attribute you need to add is the 'repository' attribute, which is the nucleus path to the repository component that the item you are linking to resides. Querying for an "employee" address should not be such a laborious query now.


The table name you provide should simply be the view name. Make sure and mark it as read only, assuming your view is designed to be read only, which most are. Some databases support write operations to views which then populate underlying tables, if this is the case, you will also want to invalidate caches accordingly to ensure your users are seeing the appropriate data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜