"error": {
"code": "",
"message": "The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types
'Edm.Int32' and 'Edm.String' for operator kind 'Equal'.",
"details": [],
"innererror": {
"message": "A binary operator with incompatible types was detected. Found operand types 'Edm.Int32' and 'Edm.String' for operator kind 'Equal'.",
"type": "Microsoft.OData.ODataException",
"stacktrace": " at Microsoft.OData.UriParser.BinaryOperatorBinder.PromoteOperandTypes
(BinaryOperatorKind binaryOperatorKind, SingleValueNode& left, SingleValueNode& right, TypeFacetsPromotionRules facetsPromotionRules)\r\n
at Microsoft.OData.UriParser.ODataUriResolver.PromoteBinaryOperandTypes(BinaryOperatorKind binaryOperatorKind, SingleValueNode& leftNode, SingleValueNode&
rightNode, IEdmTypeReference& typeReference)\r\n at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n
at Microsoft.OData.UriParser.MetadataBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n at Microsoft.OData.UriParser.MetadataBinder.Bind
(QueryToken token)\r\n at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n
at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n at Microsoft.OData.UriParser.MetadataBinder.
BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n at
Microsoft.OData.UriParser.FilterBinder.BindFilter(QueryToken filter)\r\n at Microsoft.OData.UriParser.ODataQueryOptionParser.
ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, ODataPathInfo odataPathInfo)\r\n
at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilter()\r\n at Microsoft.AspNet.OData.Query.FilterQueryOption.get_FilterClause()\r\n
at Microsoft.AspNet.OData.Query.Validators.FilterQueryValidator.Validate(FilterQueryOption filterQueryOption, ODataValidationSettings settings)\r\n
at Microsoft.AspNet.OData.Query.FilterQueryOption.Validate(ODataValidationSettings validationSettings)\r\n at Microsoft.AspNet.OData.Query.Validators
.ODataQueryValidator.Validate(ODataQueryOptions options, ODataValidationSettings validationSettings)\r\n at Microsoft.AspNet.OData.Query.ODataQueryOptions.
Validate(ODataValidationSettings validationSettings)\r\n at Microsoft.AspNet.OData.EnableQueryAttribute.ValidateQuery(HttpRequest request, ODataQueryOptions
queryOptions)\r\n at Microsoft.AspNet.OData.EnableQueryAttribute.CreateAndValidateQueryOptions(HttpRequest request, ODataQueryContext queryContext)\r\n
at Microsoft.AspNet.OData.EnableQueryAttribute.<>c__DisplayClass1_0.<OnActionExecuted>b__1(ODataQueryContext queryContext)\r\n at Microsoft.AspNet.OData.
EnableQueryAttribute.ExecuteQuery(Object responseValue, IQueryable singleResultCollection, IWebApiActionDescriptor actionDescriptor, Func`2 modelFunction,
IWebApiRequestMessage request, Func`2 createQueryOptionFunction)\r\n at Microsoft.AspNet.OData.EnableQueryAttribute.OnActionExecuted(Object responseValue,
IQueryable singleResultCollection, IWebApiActionDescriptor actionDescriptor, IWebApiRequestMessage request, Func`2 modelFunction, Func`2 createQueryOptionFunction, Action`1 createResponseAction,
Action`3 createErrorAction)"
}
}
}
When I run the query https://localhost:5001/odata/Manufacturers?$select=ManufacturerName,Id&$filter=startswith(tolower(ManufacturerName),%27acer%27)%20and%20Id%20eq%20%27Acer%27
I get the error, when i remove the FILTER perameter i get a good reponse.
I have tried using a custom filter script in my code but the component is not using it it is still using the built in filtering option.
here is my component .
<ejs-combobox
id="category"
ref="categoryObj"
:popupHeight="height"
:query="query"
:ignoreCase="true"
:autofill="autoFill"
:allowFiltering="allowFiltering"
:filtering="onfiltering"
:noRecordsTemplate="nTemplate"
:fields="fields"
:dataSource="data"
:placeholder="waterMark"
floatLabelType="Auto"
:focus="onFocus"
v-model="inputValue"
:cssClass="className">
</ejs-combobox>
and here is my custom filter code
onfiltering: function (e) {
var data = new DataManager({
url: "https://localhost:5001/odata/Categories",
crossDomain: true
});
if (e.text == "") e.updateData(data);
else {
var query = new Query().select(["Id", "CategoryName"]);
query = (e.text !== "") ? query.where('CategoryName', 'endswith', e.text, true) : query;
e.updateData(data, query);
}
}
Again the custom filtering code is not being picked up on by the component.
Can you help me figure out why this is happening so that I can get it resolved. I need the filtering capabilities of my custom value combobox but this is just not working as expected.
I have already updated to the latest components as well and the issue still persists.
please advise
David