odata-client-php
odata-client-php copied to clipboard
Support for OData Int64 identifiers
I think the wrapKey function is not aware of 64-bit integers (Edm.Int64) with format [-] [0-9]+L.
I tried a query with one which generated the filter:
$filter=(ID eq '354760000354760L').
Instead, I would expect it to generate:
$filter=(ID eq 354760000354760L).
The error response from the service was:
The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.Int64' and 'Edm.String' for operator kind 'Equal'.
(Originally published at: https://gregorlove.com/2023/07/support-for-odata-int64-identifiers/)
@gRegorLove,
But you should be able to do 354760000354760 without the L suffix.
$client->from('EntitySet')->whereKey(354760000354760);
Let me know if that doesn't work.