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

Camelcase Name not found #273

Open
laruche opened this issue Jun 24, 2019 · 5 comments
Open

Camelcase Name not found #273

laruche opened this issue Jun 24, 2019 · 5 comments
Assignees
Labels

Comments

@laruche
Copy link

laruche commented Jun 24, 2019

Hi team,
I have an issue on camelcase usage on Model definition

I work with PSql & Sequelize
My models are defined like this .

createdAt: { type: DataTypes.DATE, allowNull: true, field: 'created_at', defaultValue: sequelize.fn('NOW') }

When I use my controllers, I have no issue, but with forest i'v got this error :

[forest] 🌳🌳🌳 Unexpected error: column Consumer.createdAt does not exist SequelizeDatabaseError: column Consumer.createdAt does not exist at Query.formatError (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/sequelize/lib/dialects/postgres/query.js:363:16) at query.catch.err (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/sequelize/lib/dialects/postgres/query.js:86:18) at tryCatcher (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (/Users/laruche/Sites/carrefourX/API/node_rest_api_mysql/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:763:18) at tryOnImmediate (timers.js:734:5) at processImmediate (timers.js:716:5) at process.topLevelDomainCallback (domain.js:101:23)

It's look like a quote error in sequelize / forest implementation

sequelize/sequelize#2495

Jekiwijaya added a commit to Jekiwijaya/forest-express-sequelize that referenced this issue Jul 2, 2019
… option

access the schema field columnName instead access directly through the fieldName.

Closed ForestAdmin#282
Closed ForestAdmin#273
@arnaudbesnier
Copy link
Member

Hi @laruche,

Could you detail if this issue happens when listing/requesting records or when displaying charts?
I am trying to understand if the implemented pull request really fixes your issue.

Thanks for your help.

@laruche
Copy link
Author

laruche commented Jul 7, 2019

Hello

This bug appear when i displayîng chart only

@VincentMolinie
Copy link
Member

Will be fixed by this PR: #301

@laruche
Copy link
Author

laruche commented Aug 6, 2019

Nice :)
Time to release ?

@VincentMolinie
Copy link
Member

@laruche we will close the issue and ping you as soon as it is released ;)

@VincentMolinie VincentMolinie self-assigned this Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants