Closed graphicsxp closed 3 years ago
Very strange! I'll look into it.
Indeed. For the time being I am adding a dummy predicate to all my queries to force an extra AND on the 'id' of my entity (which is never null)
predicate.push(new Predicate('id', FilterQueryOp.NotEquals, null));
that forces the query to be built correctly, but that's obviously a hack. I hope you can come up with a solution !
Found the problem - the predicate attempts to simplify the "and" operation but it doesn't work when the clauses are "or" operations. Will be fixed in next release.
Fixed in release 2.1.0
I came across an odd issue with the following predicate :
the resulting where clause should be :
where (statusValue = 1 or statusValue = 4 or statusValue = 5) and (claimedByUserId = "the guid" or claimedByUserId = null)
Instead the query sent to the server has the following where clause :
The problem seems to be in adapter-uri-builder-json.ts at line
let json = entityQuery.toJSONExt( { entityType: entityType, toNameOnServer: true}) as any;
I'm using breeze-client 2.0.7.
Any idea how this could be fixed? This is a rather critical issue for me.
SOME MORE INFO :
If I add a third predicate (just a binary predicate) then the query is built correctly !
Check this out; I've added a predicate requetNumber
and now the output query is :
looks like a bug to me. Can you confirm ?