문제

I am building EntityQuery. Now I would like to get filter segment out of it? I know toString() will give me human readable string, but I want actual filter string that will be sent to fetch data along with URL.

도움이 되었습니까?

해결책

The following should do it:

var queryString: string = this._manager.metadataStore.toQueryString(query);

manager being your EntityManager and query being the EntityQuery.

Result

SomeEntity?$filter=FirstFilter%2Fany(x1%3A%20x1%2FLicenseTypeId%20ne%2016730)&$expand=FirstFilter%2CFirstFilter%2FPartners%2CAddresses&$inlinecount=allpages

and here is an alternative that I don't quite like as much:

var anotherway = query._toUri(manager.metadataStore);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top