Skip to Content
0

batch read operation - get all filters at once instead of getting one by one

Apr 12, 2017 at 05:45 AM

65

avatar image

I am passing multiple filters to the batch... but the get_expanded_entityset method gets called that many times ( means number of filter times )...

So in the get_expanded_entityset method multiple db queries are happening...

Is there a way to collect all the filter values at once?

I was debugging through the gateway code and found that there is a call transformation in a method which gives only one filter value at a time....

In case of create, we can use the changeset methods so that the commit will happen only in the end... So we can collect all the filter values at once...

Is there any way to collect all the filter values at once?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Apr 17, 2017 at 04:23 AM
0

Hello Kumar,

As far as i know we do not have any way to collect all the GET operations ( Keys & Filters ) which are coming as part of the Batch Payload.

If you are passing different values but for a single filter parameter then you can use OR operator in the URL to pass multiple values and get them as a range table inside your DPC and can be used further to avoid multiple calls. However for this you should consider the number of values which you will send as input as well and keep it very minimal. You can check this option.

Can you share the sample batch payload here which contains filter values ?

Regards,

Ashwin

Share
10 |10000 characters needed characters left characters exceeded
GOPAKUMAR PILLAI Apr 18, 2017 at 04:32 AM
0

Hi,

Thank you Ashwin for the suggestion.

Using OR I have done and getting the required response. That's first option for us. However, I was trying to find out whether there is an alternative to it like collecting the filter values at once.

I just have one doubt. Since we are using POST, by using OR ,there will be no restrictions in the number of filters I can pass ... RIGHT? .

Would there be any limit to the number of filters that I pass through POST?

Regards,

Gopa

Share
10 |10000 characters needed characters left characters exceeded