I want to display records that have a value of deletedAt

Feature(s) impacted

I want to display records that have a value of deletedAt.

Observed behavior

I came across this document.

Expected behavior

I am using @forestadmin/agent and do not know how to set it up.
Can you please tell me how to do this?

I would like to display it even at the relation destination, so I would like to use model options, etc. instead of segment.

Failure Logs

Context

  • Project name: …

  • Team name: …

  • Environment name: …

  • Agent technology: nodejs

  • Agent (forest package) name & version:
    @forestadmin/agent 1.36.12
    @forestadmin/datasource-sequelize 1.5.26

  • Database type: postgresql

  • Recent changes made on your end if any: …

Hello @Toshimitsu,

The agent was not designed to support soft deleted records, the woodshop you shared makes use of Sequelize’s configuration to allow retrieving soft deleted records.

To better understand your case;

  • Do you want this behaviour on each collections ?
  • I see that you’re using the @forestadmin/datasource-sequelize, could you share the configuration define for the collection ? (if you wish to set this behaviour on a specific collection)

Thanks for the reply.
Sorry for the late reply.

I understood that it is not supported by agent.

There is only one table with a deletedAt column.
I wanted to be able to see the value when referring to this table from another table as it is not displayed.
I have not defined the settings myself as they are created automatically by agent when I do npm run start.

Thanks.

I have not defined the settings myself as they are created automatically by agent when I do npm run start.

I supposed that you were using @forestadmin/datasource-sequelize by looking at the configuration of a project you have previously shared. But maybe we’re not talking about the same project.
Could you share the name of your project or confirm wether you are using @forestadmin/datasource-sequelize or @forestadmin/datasource-sql.

If you are using @forestadmin/datasource-sql, we would have no workaround, the only thing I can do is forward this as a feature request.

Sorry for the late reply.

I was using datasource-sql.
I found datasouce-sequelize in package-lock.json, so I shared that one.

“dependencies”: {
@forestadmin/agent”: “^1.0.0”,
@forestadmin/datasource-sql”: “^1.0.0”,
“axios”: “^1.6.5”,
“csv-parse”: “^5.5.3”,
“dotenv”: “^16.0.1”,
“pg”: “^8.8.0”
},

I understood that with datasource-sql, there is no solution.

Thank you for your support.

1 Like