Polymorphic relationship nested in block - using join field, queries, etc. #12474
Unanswered
ejasarevic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
Tried to figure it out from docs, but couldn't find a way. Please point to existing issue/discussion or something that I am doing wrong.
I am building a website layout with following collections and blocks.
I want to add logic before any teaser/post is deleted to check if it is referenced in some page in slot1 or slot2.
Tried using something like this in
Teaser -> beforeDelete
hook, but it fails withThe following path cannot be queried: content.slot1
If "layout variant" blocks are not polymorphic and I use only "Teaser" or "Posts" then it works as expected.
Pages collection:
Layout block variants (1 col, 2 cols, 3 cols, etc.)
1 col = 100% width
2 cols = 50% 50%, etc.
Teaser collection
Posts collection
Or also with usage of
join
field inTeaser
collection which produces following error:[error: invalid reference to FROM-clause entry for table "_pages_v"] {
Beta Was this translation helpful? Give feedback.
All reactions