Table name adds 's' character
Hey, I'm getting the next error, after defining the next scheme: (edited the real names)
const model = dynamo.define("my_table_name", {
hashKey: "the_hash_key",
});
getting the error
is not authorized to perform: dynamodb :GetItem on resource: arn:aws:dynamodb:us-east-11234:table/my_table_names'
I wrote my_table_name and for some reason it tries to access my_table_names
when editing on lib\index.js the line
var tableName = name.toLowerCase() + 's';
to
var tableName = name.toLowerCase()
it works
Use the "tableName" property in the options (next to hashKey) to specify a different table name. You should also be calling dynamo.createTables so it handles creating those tables for you anyway.
This tripped me up for quite a while. Might be worth making a note of it in the Readme?