Get relatedTo from Neo field In channel A, we have a Neo field with a couple of different block types, in 1 of those types we have an entries field with channel B entries.

On the channel B entry, I'd like to find out if it is related to a channel A entry through that Neo field.

Going by https://craftcms.com/docs/relations and how it works for a Matrix field I have this:

      {% set partOfChannelA = craft.entries.section('channelA').relatedTo({
        targetElement: entryChannelB,
        field: 'neoField.blockType.fieldHandle'
    }) %}


But that doesn't work :)
Am I missing something or does this simply not work with a Neo field?
Thanks for helping out!
I ended up fixing this with a variable and querying it myself.

In this case I needed the related entry if it was linked and a false if it wasn't.

$neoElement = craft()-&gt;db-&gt;createCommand()
    -&gt;select('craft_relations.sourceId')
    -&gt;from('relations')
    -&gt;where('craft_relations.fieldId = 110')
    -&gt;andWhere('craft_relations.targetId = :entryId', ['entryId' =&gt; $entry-&gt;id])
    -&gt;queryColumn();

if(!empty($neoElement)) {
    $parents = craft()-&gt;db-&gt;createCommand()
        -&gt;select('craft_neoblocks.ownerId')
        -&gt;from('neoblocks')
        -&gt;where('craft_neoblocks.id = :neoElementId', ['neoElementId' =&gt; $neoElement[0]])
        -&gt;queryColumn();

    if(!empty($parents)) {
        $entry = craft()-&gt;entries-&gt;getEntryById($parents[0]);
        return $parent;
    }
}

return false;