cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry - Is it possible to populate objects to 2 Main Object collections in a single fetch?

Marçal_Oliveras
Active Contributor
0 Kudos

Hi,

In my case I'm working with Work Manager 6.2 and I would like to add the Documents Links to its collection during the Work Order fetch.

So basically I would like to fill the 2 collections in a single fetch call, but as far as I know the steplet class can only return a single table. Is that right?

I know how to do this using separate fetches, but it affects the performance because I have to execute the work orders select twice to know what documents links should I fetch.

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Marcal,

One option would be to fetch it together and cache the document links in the Java layer so when the secondary read step runs it can just return without needing to go to the backend again.

--Bill

Marçal_Oliveras
Active Contributor
0 Kudos

Thanks Bill,

I see that actually there is a  DocumentLinkComponentManager already in place that I may be able to reuse for that purpose. I will investigate this solution.

Marçal_Oliveras
Active Contributor
0 Kudos

Hi Bill,

That came out from your tip I hope it can help others

Answers (1)

Answers (1)

Former Member
0 Kudos

one solution you may already know is

while you are getting work orders, put the orders/document id in a temp z table.

while you are running the second fetch, you can have better performance.

Marçal_Oliveras
Active Contributor
0 Kudos

Thanks Kevin,

That´s also a good solution and easier to implement but I will try if I manage with Bill´s proposal.