AnsweredAssumed Answered

getRelatedAssets() and associations

Question asked by dsaum on Jun 10, 2011
Latest reply on Jun 13, 2011 by dsaum
Trying to display some associations I've created and populated in Share/Alfresco through the WCMQS API.

I defined the association (salesRep) against an aspect (salesTerritory) as follows:

<aspect name="sagedoc:salesTerritory">
   <title>Sales Territory (State)</title>
      <association name="sagedoc:reps">

This part works well. I'm able to go into share, create a salesTerritory and assign it some reps.

The problem, however, is display this relationship through the WCMQS API.

I have a reference to an instance of an Asset representing the territory. I expect that when I call getRelatedAssets() with no args or getRelatedAssets("sagedoc:reps") I should get back either a map or a collection containing the reps I've assigned to this territory.

What I get, however, is an empty collection if I provide an arg and a null result if I call the method with no args.

Does Asset.getRelatedAssets() method not provide access to the underlying associations?

Does it only provide access to a subset that have been defined in the WCMQS model?

Is there another way to access the associations I've defined?

Thanks a lot!