<p>Assuming <code>mixedContent</code> is a Matrix or relational field, the correct syntax would be:</p>

<pre class="lang-twig prettyprint-override"><code>{% set mixedContent = entry.mixedContent.with([
    'singleImage:image',
    'imageGallery:images',
    'download:file',
    'relatedItems:relatedItems'
]).all() %}
</code></pre>

CC BY-SA 3.0
2017-08-10T08:51:14.393Z
So `entry.mixedContent(params)` is not supported any longer, and what about `craft.entries(params)`?
carlcs
CC BY-SA 3.0
2017-08-10T15:14:02.033Z
@carlcs `mixedContent(params)` wouldn’t have worked in v2 either; it’s just that `all(params)` doesn’t work like `find(params)` had. Yes, `craft.entries(params)` still works.
Brandon Kelly
CC BY-SA 3.0
2017-08-09T22:40:34.360Z
2017-08-10T05:54:06.380Z
2017-08-10T05:54:06.380Z
Brandon Kelly
<p>.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.</p>

<p>My working Craft 2 code might be:</p>

<pre><code>{% set mixedContent = entry.mixedContent.find({
    with: [
        'singleImage:image',
        'imageGallery:images',
        'download:file',
        'relatedItems:relatedItems'
    ]
}) %}
</code></pre>

<p>Simply transposing ".find" with ".all" results in the following error:</p>

<p><code>Error: Call to a member function getQueryBuilder() on array</code></p>

<p>Switching the syntax I tried:</p>

<pre><code>{% set mixedContent = entry.mixedContent({
    with: [
        'singleImage:image',
        'imageGallery:images',
        'download:file',
        'relatedItems:relatedItems'
    ]
}).all() %}
</code></pre>

<p>But got this error:</p>

<p><code>Calling unknown method: craft\elements\Entry::mixedContent()</code></p>

<p>What am I doing wrong?</p>

<craft3>
Craft 3: .find() deprecated but .all() fails?
# Craft 3: .find() deprecated but .all() fails?

(Asked by: username_0 on 2017-08-09)

.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?

**Tags:** craft3


---

## 1 answers

### Answer by username_1 on 2017-08-09. Score: 4 | Accepted answer

Assuming mixedContent is a Matrix or relational field, the correct syntax would be:
{% set mixedContent = entry.mixedContent.with([
    'singleImage:image',
    'imageGallery:images',
    'download:file',
    'relatedItems:relatedItems'
]).all() %}

> **Comments:**
> **username_2**: So `entry.mixedContent(params)` is not supported any longer, and what about `craft.entries(params)`?  
> **username_1**: @username_2 `mixedContent(params)` wouldn’t have worked in v2 either; it’s just that `all(params)` doesn’t work like `find(params)` had. Yes, `craft.entries(params)` still works.  

---

