-
Notifications
You must be signed in to change notification settings - Fork 5
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
How to search for text within attribute list? #184
Comments
From the documentation itself I would assume it's correct as this produces the correct predicate:
And as you can see the message comes back from the API that it doesn't support this option. This means it's not an issue of the SDK itself. Could you please forward this to our support at https://support.commercetools.com |
Okay, so I get in contact with CT support and according to them the "in" operator should be used:
So I tried as following.... var queryCommand = new QueryCommand<ProductProjection>();
queryCommand .Where(p => p.Variants.Any(variant => variant.Attributes.Any(attribute =>
attribute.Name == "MyCustomAttribute" &&
attribute.ToTextAttribute().Value.In("MyCustomValue")))); ...which does return expected result although "MyCustomAttribute" is set of text. Does this mean there will be an upcoming change to .NET Sdk? |
What's the proper way to filter for value within a (custom) attribute list?
Currently I'm trying to do as following...
...which doesn't work out since API returns BadRequest:
Response: {"statusCode":400,"message":"Malformed parameter: where: The field 'value' does not support this expression.","errors":[{"code":"InvalidInput","message":"Malformed parameter: where: The field 'value' does not support this expression."}]}
Any ideas?
Using version 1.1.3 of commercetools.Sdk.All.
The text was updated successfully, but these errors were encountered: