This is more of a question rather than a feature or a bug. I already have a “Readable Name” for each column in my other backend code, which uses the same underlying database.
Is there a way for me to define and lock display names on the forest admin server code? So that I can just code it up all at bulk rather than changing it individually from UI.
Is there a way for me to define and lock display names on the forest admin server code? So that I can just code it up all at bulk rather than changing it individually from UI.
I’m not sure to perfectly get what you want here.
Sequelize allow you to set “aliases” on column, and you should be able to use it on your lumber backend code.
Here is an example:
const CarPart = sequelize.define('carPart', {
myVeryCustomPartName: { // The backend name of the field, can be used in your code
type: DataTypes.STRING,
field: 'partname', // The database field name
},
}, {
tableName: 'CarPart',
timestamps: false,
schema: process.env.DATABASE_SCHEMA,
});
Then, if I log the request body in a route
// Create a Car Part
router.post('/carPart', permissionMiddlewareCreator.create(), (request, response, next) => {
console.log(request.body)
// Learn what this route does here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/routes/default-routes#create-a-record
next();
});