I am having the same problem.
If I have something like this:
export default {
async beforeUpdate(event) {
console.log(event.params.data.blog_post)
},
};
In a content type like that:
{
"kind": "collectionType",
"collectionName": "abstract_pages",
"info": {
"singularName": "abstract-page",
"pluralName": "abstract-pages",
"displayName": "Abstract-page",
"name": "abstract-page",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"blog_post": {
"type": "relation",
"relation": "oneToOne",
"target": "api::blog-post.blog-post"
}
}
}
I get in the console log this:
{
disconnect: [
],
connect: [
],
}
But in Strapi I can see the relation is there normally.
I am looking for a work around but no luck so far.
Anyone with a possible solution for this?