baseprime / dynamodb

DynamoDB data mapper for Node.js
Other
296 stars 88 forks source link

Why are tables pluralised by default? #83

Closed jaitaiwan closed 3 years ago

jaitaiwan commented 4 years ago

Hi,

Why is it on line https://github.com/baseprime/dynamodb/blob/72dc874a1de4d500f5effa383a88255049f00632/lib/index.js#L71 table names are pluralised by default? I've just spent countless hours on this trying to find out why I was getting a "ResourceNotFoundException" error πŸ˜…

Happy to do a PR and update documentation to turn this off.

Thanks

bitconquer commented 3 years ago

I agree with @jaitaiwan, this is not very intuitive and takes away control over an important parameter for the developer. Having an option to disable this conversion would be handy.

AbirAbbas commented 3 years ago

This is common amongst ORMs

jaitaiwan commented 3 years ago

Not interested in giving the user control of this or document it? It’s also common for ORMs to give users the ability to override default behaviour like this.