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

This is really an odd issue!!!!!!!!!!!!!

Open RobertZito opened this issue 11 years ago • 1 comments

Okay, I have been fighting with this all day and I found an odd pattern. I have a table named inventory, every time I use inventory.using(connection).all I get an error [Error: ORA-00942: table or view does not exist]. In the trace I see the table name select t0.id AS c0 FROM inventorys t0 [], note the "s". When I rename the table to inventorys the code works, where is this s coming from and can this really be the issue?

RobertZito avatar Mar 16 '14 20:03 RobertZito

I believe this library automatically appends an S to the table names of which you named your model.

You can do the following: var Monkies = persist.define('Monkies',{ //model definition here },{tableName:'inventory'});

ioneyed avatar Mar 31 '14 17:03 ioneyed