I have a section with a Super Table field that has an entry field. Now I want to find the entries that have a relation to that entry.
I found this answer here. This but I can not get it to work with the entry field type.
Thank you for your help
$events = Entry::find() ->section('foo') ->leftJoin('supertableblocks', 'supertableblocks.ownerId = entries.id') ->leftJoin('stc_foo', 'stc_foo.elementId = supertableblocks.id') ->groupBy('supertableblocks.ownerId') ->where(I don't know what to do here with the entry field) ->all();