We have a SAP CAP backend in Nodejs with a SQLite database. This is only for development purposes, in production it runs a HANA database.
After upgrading to version 7.5.3 of the @sap/cds package, the boolean comparison all of the sudden no longer works.
So I have a database table Projects, that includes two boolean values: isExample and isArchived. In the Projects page (SAPUI5 frontend) we filter projects based on these two values:
this.filters = [
new Filter('isExample', FilterOperator.EQ, false),
new Filter('isArchived', FilterOperator.EQ, false)
];
this.filters is used as filters object in the databinding.
Since the update I no longer receive any data from the database with these filters enabled. The same occurs when adding these filters directly into a view in the schema:
entity ProjectsArchive as projection on Projects where Projects.isArchived = true
entity ProjectsExamples as projection on Projects where Projects.isArchived = false and ProjectsSearch.isExample = true
Whenever I disable the filters, it works and I receive data. On production, with the HANA database, this just works without any issues.
Does anybody have an idea what I'm doing wrong here?
I tried to change the 'true/false' values to '0/1' values, or 'true' and 'false' as strings. This all did nothing.
I reviewed the actual view on the database:
SELECT [list-with-columns]
FROM MainService_ProjectsSearch AS ProjectsSearch_0
WHERE ProjectsSearch_0.isArchived = TRUE
In the DB Browser for SQLite this returns 0 items. When I change the WHERE to .isArchived = 'TRUE', it works and the query returns values. But in code that does not make a difference.