Strange behavior

Hello,

I have 2 tables with given names : loan_request_status and loan_request_statuses…

Forest Agent generate the same display name for both tables…We have changed the display names, but a bug remains : loan_request_statuses display wrong datas : bad page count, empty fields, etc…

How can we fix this ?

Regards,

David

Hello @dscreve,

Ok, I have never seen something like this but indeed changing the display name won’t help in this case… It’s probably due to some internal singularize/pluralize issues. :eyes:

But I need more information to deep dive in.

  • What is the name of your project?
  • What agent (and version) are you using?
    • If you do use @forestadmin/agent what data sources are you using?

Kind regards,
Morgan

Hello,

Project Name : PledgerMiddleV2
Agent :
@forestadmin/agent”: “^1.35.17”,
@forestadmin/datasource-sequelize”: “^1.5.24”,
@forestadmin/datasource-sql”: “^1.7.39”,

We use Sequelize and SQL datasources.

Regards,

David

In this case, you can override the collection name in the code side not in the frontend.

.addDataSource(
  createSqlDataSource(process.env.DATABASE_URL),
  { rename: { oldName: 'newName'} },
)

You can find out more here: Naming conflicts - Node.js Developer Guide

Let me know if it helps.

Kind regards,
Morgan

1 Like

Yes ! it works perfectly !

Thanks a lot !

2 Likes

Superbe, glad to hear that. :pray: Have a nice experience.

Kind regards,
Morgan

1 Like