SAP / node-hdb

SAP HANA Database Client for Node
Apache License 2.0
317 stars 98 forks source link

Crashes with LOBs with Duplicated Alias #212

Open fort-j opened 1 year ago

fort-j commented 1 year ago

The module appears to catastrophically crash when executing a query asking for two or more fields with the same Alias with the type of the first one being db_Memo (an LOB) and the other one being something different, e.g.:

SELECT TOP 1 OCLG."Notes", OCRD."Notes"
FROM [DB].OCRD OCRD
JOIN [DB].OCLG OCLG ON OCLG."CardCode" = OCRD."CardCode"

This issue should occur for fields of all non-LOB types if an LOB is asked first with the same alias. While having fields with the same alias is not ideal, at the very least it shouldn't crash the module. Also, this same query works without any issue when run on HDB Studio and even brings back both coulmns.

I hope this issue can be fixed as the module is very useful otherwise.