Closed nasali closed 10 years ago
Hmm, that should be ok. What's the resulting query look like? You can call .query
on the QueryBuilder
object to see what is going to be called.
Thanks for the response. I grabbed .query on a newly created QueryBuilder to check for null colors and this is what I see:
Query is /Heffalumps?$filter=COLOR+eq+null
I'm starting to wonder whether the xsodata server simply does not support null queries.
I just tried executing the query with Postman and the response is the following:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en-US">No property 'null' exists in type 'datamapper.heffalumps.HeffalumpsType'.</message>
</error>
Thanks again.
Maybe it has to be NULL in all caps? OData is very case-sensitive.
Yeah, I've tried all different combinations, and they all result in that same error like so:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en-US">No property 'NULL' exists in type 'datamapper.heffalumps.HeffalumpsType'.</message>
</error>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en-US">No property 'Null' exists in type 'datamapper.heffalumps.HeffalumpsType'.</message>
</error>
It seems like the server-side code thinks it's a property, which probably means it doesn't support null. I'm posting a question on the HANA forums to find out what the deal is on the server.
Thank you.
Any more information about this?
As it turns out, the SAP HANA SP6 implementation of OData V2 is incomplete and does not yet support null keyword. Their next release is supposed to address that.
Hi there,
Executing a query that has a not null check, against xsodata source that defines a Heffalumps collection with a nullable COLOR string property, fails like so:
URI Conventions state: "In addition to operators, a set of functions are also defined for use with the filter query string operator. The following table lists the available functions. Note: ISNULL or COALESCE operators are not defined. Instead, there is a null literal which can be used in comparisons."
What am I missing?