Open jordimontana82 opened 5 years ago
Sample unit test to reproduce:
test("$filter: eq test with Guid", done => {
context.initialize([
new Entity("email", Guid.create(), {description: 'Email Text 1', _regardingobjectid_value: "2289062e-d689-2292-51d0-d85ce235a927", other: "somevalue"}),
new Entity("email", Guid.create(), {description: 'Email Text 2', _regardingobjectid_value: "2289062e-d689-2292-51d0-d85ce235a927", other: "someothervalue"})
]);
WebApiClient.retrieveMultiple("emails?$filter=_regardingobjectid_value eq 2289062e-d689-2292-51d0-d85ce235a927", function (data) {
expect(data.value.length).toBe(2);
expect(data.value[0].description).toBe("Email Text 1");
expect(data.value[1].description).toBe("Email Text 2");
done();
});
});
When filtering by Guid, literal.value is undefined, since is not interpreted as a literal value by the odata parser
Ex: emails?$select=*&$filter=_regardingobjectid_value eq 2289062e-d689-2292-51d0-d85ce235a927