You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently in the process of migrating my Payload 2.28 project to Payload 3.14
In one of my field blocks, I have a Has Many - Polymorphic relationship field.
In Payload 2 I used to be able to run a query with multiple values (where the values can be either pages or products id's.) like this:
Twansparant
changed the title
Querying polymorphic relationship with multiple values not wortking anymore in payload 3
Querying polymorphic relationship with [all] not working in payload 3
Jan 20, 2025
Describe the Bug
I'm currently in the process of migrating my Payload 2.28 project to Payload 3.14
In one of my field blocks, I have a Has Many - Polymorphic relationship field.
In Payload 2 I used to be able to run a query with multiple values (where the values can be either
pages
orproducts
id's.) like this:?where[polymorphic.value][all]=66e98b37e62a08c1d2caca54,66ed8d9e4e47342f77c96287
However running the exact same query in Payload 3 returns
0 docs
.My content has stayed the same (after running the mongo migration script)
Link to the code that reproduces this issue
https://github.com/Twansparant/payload
Reproduction Steps
example post
in admin and select theexample page
&example product
in thePolymorphic
field.ids
for theexample page
&example product
and replace them in the url of step 5"totalDocs": 0
while it should have 1 containing theexample post
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: