Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug during PUT (update) #9

Open
idrenski opened this issue Jan 20, 2017 · 1 comment
Open

Bug during PUT (update) #9

idrenski opened this issue Jan 20, 2017 · 1 comment

Comments

@idrenski
Copy link

There is bug during PUT (update) at line 1310.
var selectQuery = 'select * from "'+table+'" where "id"='+data["whereid"];

{
"originalError": {},
"_e": {},
"rawStack": ": ORA-01722: invalid number\n",
"details": "Details: Error: ORA-01722: invalid number\n\n",
"message": "[Error (E_UNKNOWN) Encountered an unexpected error] Details: Error: ORA-01722: invalid number\n\n",
"stack": "Error (E_UNKNOWN) :: Encountered an unexpected error\n: ORA-01722: invalid number\n"
}

@idrenski
Copy link
Author

idrenski commented Jan 20, 2017

I see this is fixed with the following:


 var keysOptionsSelect = Object.keys(oraOptions.where);
                            for (var z = 1; z < keysOptionsSelect.length + 1; z++) {
                                findQuery = findQuery.replace(":" + z, ":" + keysOptionsSelect[z-1]);
                            }
                            
                            connection.execute(findQuery, oraOptions.where,  {outFormat: oracledb.OBJECT}, function __CREATE_SELECT__(err, result) { ...

I tested the fix and it works. The issue can be closed.

@idrenski idrenski changed the title Bug during update Bug during PUT (update) Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant