Replies: 2 comments 7 replies
-
It's not yet possible, but there are a few PRs pending that will enable it: For now you just ->get() then ->filter() |
Beta Was this translation helpful? Give feedback.
1 reply
-
Until #7454 / #8476 is merged, you can achieve this but it's a little hacky and you need to know how many sessions will be selected... $entry = \Statamic\Facades\Entry::query()
->where('days->0->sessions', $sessionId)
->orWhere('days->1->sessions', $sessionId)
->orWhere('days->2->sessions', $sessionId)
->orWhere('days->3->sessions', $sessionId)
->orWhere('days->4->sessions', $sessionId)
->orWhere('days->5->sessions', $sessionId)
->orWhere('days->6->sessions', $sessionId)
->orWhere('days->7->sessions', $sessionId)
->orWhere('days->8->sessions', $sessionId); Again, it's a little hacky but it works 🤷♂️ |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how I can query entry by nested relation using Entry facade
I have data like this in yaml file,
days
is a replicator field with sessions entriesI want to get conference by session id like
5cf7e474-6261-4c61-90bb-790e742950eb
???Beta Was this translation helpful? Give feedback.
All reactions