Column Name Caching Issue with MariaDB Plugin

Hi,

I’m using the MariaDB plugin and have successfully connected to my external database. I can retrieve collections (tables) and fields without issue.

While testing the data source with a simple editable table, I noticed a problem: any column with a space in its name (e.g. first name) cannot be edited or updated in NocoBase. Other columns without spaces work fine.

To resolve this, I renamed all columns with spaces to use underscores instead (e.g. Last NameLast_Name). After updating the database and refreshing the data source in NocoBase, the updated column names are displayed correctly.

However, when I attempt to update a record, the SQL generated by NocoBase still references the old column name (e.g. Last Name), which results in an error.

image

Error code here:

{"level":"error","message":"(conn=3340, no: 1054, SQLState: 42S22) Unknown column 'Last Name' in 'NEW'\nsql: UPDATE `student` SET `First_Name`=? WHERE `SID` = ? - parameters:['Nasir Bin',95]","meta":{"err":"Error\n    at Query.run (/app/nocobase/node_modules/sequelize/lib/dialects/mariadb/query.js:53:25)\n    at /app/nocobase/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async MySQLQueryInterface.update (/app/nocobase/node_modules/sequelize/lib/dialects/abstract/query-interface.js:355:12)\n    at async model.save (/app/nocobase/node_modules/sequelize/lib/model.js:2490:35)\n    at async model.update (/app/nocobase/node_modules/sequelize/lib/model.js:2598:12)\n    at async updateModelByValues (/app/nocobase/node_modules/@nocobase/database/lib/update-associations.js:82:3)\n    at async _Repository.update (/app/nocobase/node_modules/@nocobase/database/lib/repository.js:448:7)\n    at async descriptor.value (/app/nocobase/node_modules/@nocobase/database/lib/decorators/transaction-decorator.js:84:29)\n    at async /app/nocobase/node_modules/@nocobase/data-source-manager/lib/default-actions/proxy-to-repository.js:54:16\n    at async triggerWorkflowActionMiddleware (/app/nocobase/node_modules/@nocobase/plugin-workflow-action-trigger/dist/server/ActionTrigger.js:61:7)\n    at async dataTemplate (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/data-template.js:36:3)\n    at async middlewares.add.tag (/app/nocobase/node_modules/@nocobase/acl/lib/acl.js:452:9)\n    at async /app/nocobase/node_modules/@nocobase/acl/lib/allow-manager.js:108:7\n    at async ACLMiddleware (/app/nocobase/node_modules/@nocobase/acl/lib/acl.js:325:14)\n    at async setCurrentRole (/app/nocobase/node_modules/@nocobase/plugin-acl/dist/server/middlewares/setCurrentRole.js:124:3)\n    at async AuthManagerMiddleware (/app/nocobase/node_modules/@nocobase/auth/lib/auth-manager.js:125:7)\n    at async validateFilterParams (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/validate-filter-params.js:47:3)\n    at async dataWrapping (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/data-wrapping.js:48:5)\n    at async cors (/app/nocobase/node_modules/@koa/cors/index.js:109:16)\n    at async errorHandler (/app/nocobase/node_modules/@nocobase/plugin-error-handler/dist/server/error-handler.js:69:9)\n    at async handleAppendDataSourceCollection (/app/nocobase/node_modules/@nocobase/plugin-data-source-manager/dist/server/plugin.js:351:7)"},"module":"student","submodule":"update","method":"error-handler","app":"main","reqId":"c23018e5-56e5-4925-9756-9f21f3cd9317","dataSourceKey":"main","timestamp":"2025-07-24 13:36:21"}

I’ve tried:

  • Restarting the NocoBase Docker container
  • Clearing the browser cache and Nocobase cache
  • Refreshing the data source
  • Delete and add a new data source

…but the issue persists.

Is there a way to fully clear or re-sync the field mappings in NocoBase so it stops referencing the old column names? Any advice would be greatly appreciated.

Thank you in advance,
Nat

Sorry, there are spaces in the field, and it is a defect that data cannot be entered.

  1. What function page is the update data page? Can you take a screenshot of the configuration information?
  2. If the field identifier is changed in the database, the field information will be synchronized when refreshing in the data source. When you go to the page again, it will prompt that the field has been deleted and needs to be reconfigured, as shown in the figure:

Thank you for your help. I think I fixed it.

Regards
Nat