node-persist icon indicating copy to clipboard operation
node-persist copied to clipboard

Error while saving many to many association in oracle

Open harishchander67 opened this issue 12 years ago • 3 comments

While saving associations this SQL is generated for oracle: INSERT INTO amg_user_interest ("amg_user_id","interest_id") VALUES (1234602,1)

It happens due to escaping of values in driver.js (line 45) that generate " in the column names.

Changing this function in oracle.js (changed return '"' + columnName + '"'; to return columnName;

escapeColumnName: function (columnName) { //return '"' + columnName + '"'; return columnName; }

Error: Error starting at line 25 in command: INSERT INTO amg_user_interest ("amg_user_id","interest_id") VALUES (1234602,1) Error at Command Line:25 Column:45 Error report: SQL Error: ORA-00904: "interest_id": invalid identifier 00904. 00000 - "%s: invalid identifier"

harishchander67 avatar Jul 27 '13 13:07 harishchander67

This issue may just like the #73 and has been resolved. You can update the repo and try again.

zorrofox avatar Aug 08 '13 02:08 zorrofox

That did not help. Version used latest (0.2.7)

harishchander67 avatar Aug 08 '13 15:08 harishchander67

PLS use the last commit https://github.com/nearinfinity/node-persist/commit/233008d77ec736ffef6055a451f13acc1e7cadf4

zorrofox avatar Aug 09 '13 01:08 zorrofox