Use Field Names on Generated Models

Hello everyone,

I’m new to Forest Admin, and I’m having some problems in relationships because of the names fore the fields on models generated by Lumber

Is it possible to tell Lumber to keep the field names from the tables?

For example:

A field named account_id on the table goes as accountId on accounts model generated by Lumber

I’m using Sequelize underscored mode, and I would like to keep this pattern because it will be easier to work with the pattern I’m already using on the database

Thanks!

Hi @Ian_Brant and thank you for joining the ForestAdmin community!

As for your concern, as is, lumber is designed to create an express app. Which is built in Javascript. That means that we crafted our model generation services to follow JS guidelines to have CamelCase model fields with the underscored: true property by default.

Note that you’re still free to replace those field names and customize the generated models.

Nevertheless, I’ll log your feedback on having a way to keep snake case fields on the models while generating them through Lumber.

Best regards,