Replies: 4 comments 1 reply
-
Maybe add a check that the relationship type is not allowed in |
Beta Was this translation helpful? Give feedback.
-
Yep - I think there are a few things we could do to improve this behavior. Right now, the query that is made on your Instead, we could intelligently parse the field type for each I'll mark this as a planned discussion feature request and we will get it added! We would also happily accept a PR here as well! |
Beta Was this translation helpful? Give feedback.
-
We should also allow group fields to be used in |
Beta Was this translation helpful? Give feedback.
-
A quick update on how to do this now even though the code here hasn't changed in a time. It isn't documented but you can use subfield paths in your For example if you have a relationship field with name: 'categories' you might want to add The same idea works for groups, arrays, etc. One limitation you might run into is with polymorphic relationships, since Payload doesn't currently support querying on values of a relationship across collections. This should be better documented and in addition to this. I still think there is some more work to do. If a config specifies a relationship as the Say we have Posts and Categories and on |
Beta Was this translation helpful? Give feedback.
-
When a relationship field is used within
listSearchableFields
, the List view will break because the search term entered will be used as aregex
search on theid
field of the related document.To properly support
relationship
field withinlistSearchableFields
, we need to determine the field type for each specifiedlistSearchableField
, and if it's arelationship
orupload
, format the field's query to search on theuseAsTitle
field instead of the relationship ID.Original report below:
Bug Report
I tried to support suport for multiple fields in my article list page
I got this error
And I inspected the network request found out it's caused by this query:
Steps to Reproduce
tags
relationship or anything similar. I don't thinkhasMany
is required to reproduce this buglistSearchableFields
Other Details
Beta Was this translation helpful? Give feedback.
All reactions