New agent nodejs, column not found, naming conflicts

Feature(s) impacted

I want to view the collection cUsers. but got this error below.

Failure Logs

I even added a field “userType” to customize the collection, and userType is appearing on the .forestadmin-schema.json but still got error.

Also I am using this renaming method for fields: (index.ts) to rename all snake_case fields to camelCase.

// Renaming fields
// All field will be renamed (the handler is called once per field)
agent.use(renameAllFields, snakeToCamelCase);
  1. I got another confusing error on email field:

    the field email in DB: “user_email”. in the v9 version of layout: “email”
    I am not sure how to to handle the naming using the new agent.

Context

  • Project name: clevermate
  • Environment name: Development
  • Agent technology: (nodejs,
  • Agent (forest package) name & version: new agent v1
  • Database type: postgres

Hello @Adel_de_Clevermate,

Regarding your issues:

  1. What is the collection error that you are getting before defining the field userType ? Does it occur on agent start ? or when you try to view the collection from the frontend ? Could you please give details about this error ? :pray:
    One note : you should be using the original field name when writing your customizations, then the renamed version of the fields should appear in your schema.

  2. If you want to have the email layout name match in the new agent you can rename it :
    this snippet should work, if your original name is using snake case:

  collection // your 'cUsers' collection
    .renameField('user_email', 'email')