-
Notifications
You must be signed in to change notification settings - Fork 103
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
Guid primitive literals non compliant with OASIS OData url conventions (v4.0) #155
Comments
Edm.Guid
)
|
|
Whereas PR #105 allows users to pass through the whole raw expression; eg.
My PR #156 only aims to pass through the raw value, while maintaining the regular syntax as before
|
I found my solution in #137, I should do this instead (undocumented):
|
Will see about updating samples and docs with this. |
@kinekt4, also curious if the following would work for your case if it's an ID/PK field: $odataClient->from('Item')->find('ec11-80f1-0022489308a6'); This is example is on the wiki, but wanted to check if it worked in your example. |
I'm using a REST api and have been successful filtering by string and decimals etc.
But when filtering a guid column I get a
400 Bad Response
with the following error:I'm currently filtering like this:
I see that the issue is related to the single quotes being added to the value in
Grammar::prepareValue()
.To prevent single quotes being added, it seems I have to explicitly define the type as a prefix
Grammar::isSpecialPrimitiveDataType()
So I've modified the guid value to something like this:
Which resulted in a different error.
Can anyone suggest anything else I can try?
Thanks!
v0.7.3
Edit
guid'<value>'
syntaxEdit 02
Rest API
Test done via Postman
id eq 'ec11-80f1-0022489308a6'
Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'.
id eq guid'ec11-80f1-0022489308a6'
id eq ec11-80f1-0022489308a6
The text was updated successfully, but these errors were encountered: