Giter VIP home page Giter VIP logo

Comments (4)

ryanfitz avatar ryanfitz commented on August 18, 2024

I can't replicate this issue, are you sure you first created a table named 'Account'? When you don't specify an exact table name, vogels will take the defined model name and lowercase and pluralize it. My guess would be you had created an 'accounts' table, but with your config setting you were telling vogels to connect to the 'Account' table.

from vogels.

deepaksisodiya avatar deepaksisodiya commented on August 18, 2024

hey, same issue i was facing,
creating table manually works for me

vogels.createTables({
'Account' : {readCapacity: 1, writeCapacity: 10},
}, function (err) {
if(err) {
console.log('Error creating tables', err);
process.exit(1);
}
console.log('created');
});

I hope, this will help :)

from vogels.

talvor avatar talvor commented on August 18, 2024

What is the reasoning behind lowercase, pluralize table names?

from vogels.

pauloddr avatar pauloddr commented on August 18, 2024

I recently came across this problem and here are my findings:

If you set tableName in your schema, setting them using Model.config({tableName: value}) will not override the previous value (which may lead to ResourceNotFound errors). I had to delete tableName from my schema to get the Model.config(...) approach to work.

In my opinion, setting tableName via Model.config(...) should overwrite whatever value was defined previously, via schema or not.

from vogels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.