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 POST (create) #10

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

Bug during POST (create) #10

idrenski opened this issue Jan 20, 2017 · 1 comment

Comments

@idrenski
Copy link

Bug during POST (create)
error:
{
"originalError": {},
"_e": {},
"rawStack": ": ORA-00904: "id": invalid identifier\n",
"details": "Details: Error: ORA-00904: "id": invalid identifier\n\n",
"message": "[Error (E_UNKNOWN) Encountered an unexpected error] Details: Error: ORA-00904: "id": invalid identifier\n\n",
"stack": "Error (E_UNKNOWN) :: Encountered an unexpected error\n: ORA-00904: "id": invalid identifier\n"
}

@idrenski
Copy link
Author

idrenski commented Jan 20, 2017

The issue is almost fixed with the following:

var selectQuery = 'select * from "'+table+'" order by "' + _getPK(connectionName, table) +'" desc';

However it returns the last record by rownum which is not always the last inserted.

The fix allows to insert but return wrong result.
It's better to use where clause in the select insted of order by desc.

var selectQuery = 'select * from "'+table+'" where '+colName+'=\''+data[colValue]+'\'';

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