Hi,
I’m trying to delete an entry with the Query Engine API based on the id of a relation.
There are two content Types with a oneToOne relation. Now, i have the id of one of the contentTypes entry and i want to delete the related content Type.
I tried this where “route.id” is the id of the related entity.
“route” is the field with the relation.
await strapi.db?.query(‘plugin::url-routes.navitem’).delete({
where: {
route: [route.id],
},
});
I also tried passing the id directly, without the brackets, but it doenst work.
Does anyone know how to do this?
This topic has been created from a Discord post (1269320606868836364) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord