Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$filter not working when calling from openui5 app #780

Closed
mgerzabek opened this issue Jan 18, 2024 · 1 comment
Closed

$filter not working when calling from openui5 app #780

mgerzabek opened this issue Jan 18, 2024 · 1 comment

Comments

@mgerzabek
Copy link
Contributor

mgerzabek commented Jan 18, 2024

Hi @27pchrisl,

I ran into another problem when submitting a $batch request.

--batch_id-1705568387070-25
Content-Type:application/http
Content-Transfer-Encoding:binary

GET Times?$skip=0&$top=100 HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true


--batch_id-1705568387070-25
Content-Type:application/http
Content-Transfer-Encoding:binary

GET Postings?$filter=user_id%20eq%202%20and%20date%20eq%202024-01-18&$skip=0&$top=100 HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true


--batch_id-1705568387070-25
Content-Type:application/http
Content-Transfer-Encoding:binary

GET SHBudgets?$filter=user_id%20eq%202%20and%20valid_from%20le%202024-01-18%20and%20valid_to%20ge%202024-01-18&$skip=0&$top=100 HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true


--batch_id-1705568387070-25--
Group ID: $auto

with all header data from client

POST /odata/$batch HTTP/1.1
Accept: multipart/mixed
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 1103
Content-Type: multipart/mixed; boundary=batch_id-1705570180734-25
Host: localhost
MIME-Version: 1.0
OData-MaxVersion: 4.0
OData-Version: 4.0
Origin: http://localhost:8080
Pragma: no-cache
Referer: http://localhost:8080/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1
X-CSRF-Token: Fetch

When calling the individual GET requests directly in the browser against lodata I get the correctly filtered data back. But the responses aggregated in the $batch response contain always the unfiltered $top entities.

What am I missing?

@27pchrisl
Copy link
Contributor

You're not missing anything, that's a bug I'm surprised I had no test case for! Fixed in https://github.com/flat3/lodata/releases/tag/v5.32.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants