.find has been deprecated and we are told to use .all() instead. This seems to work for cases that don't have Eager Loading going on, but fails when eager loading is tried.
My working Craft 2 code might be:
{% set mixedContent = entry.mixedContent.find({
with: [
'singleImage:image',
'imageGallery:images',
'download:file',
'relatedItems:relatedItems'
]
}) %}
Simply transposing ".find" with ".all" results in the following error:
Error: Call to a member function getQueryBuilder() on array
Switching the syntax I tried:
{% set mixedContent = entry.mixedContent({
with: [
'singleImage:image',
'imageGallery:images',
'download:file',
'relatedItems:relatedItems'
]
}).all() %}
But got this error:
Calling unknown method: craft\elements\Entry::mixedContent()
What am I doing wrong?