I tried to use jsreport-mssql-store and I wanted to import export.zip file from current storage to new one. I had two files with same names but located at different folders: root and specific named folder. Script from root folder was not imported due to ignoring of { folder: null } (I suppose, null means root) condition, as a result false duplicate was found with same name but from another folder. Obvious inappropriate warning message "Entity with name "ScriptName" already exists at the root level...." was shown.
This is a problem at filter.js file particular at doFilter function. When condition looks like { columnName: null } it will be ignored due to if (filter[el]) clause. Moreover there is not IS NULL case at all.
module.exports = function doFilter (query, table, filter, entityType) {
for (var el in filter) {
if (filter[el]) {
query = getOperation(el, filter[el])(query, table, el, filter[el], 'where', entityType[el] || entityType)
}
}
return query
}
Actual behavior - generated query looks like: select * from table.
Expected behavior - generated query has to look like: select * from table where columnName is null.
I tried to use jsreport-mssql-store and I wanted to import export.zip file from current storage to new one. I had two files with same names but located at different folders: root and specific named folder. Script from root folder was not imported due to ignoring of
{ folder: null }(I suppose, null means root) condition, as a result false duplicate was found with same name but from another folder. Obvious inappropriate warning message"Entity with name "ScriptName" already exists at the root level...."was shown.This is a problem at filter.js file particular at
doFilterfunction. When condition looks like{ columnName: null }it will be ignored due toif (filter[el])clause. Moreover there is notIS NULLcase at all.Actual behavior - generated query looks like:
select * from table.Expected behavior - generated query has to look like:
select * from table where columnName is null.