Answers.Body: <p>Currently no, but I suppose since Craft 3 added the <code>craft.matrixBlocks()</code> template function, it would make sense to make this possible.</p>
  
  <p>Just created a FR about this: <a href="https://github.com/craftcms/cms/issues/1820" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/1820</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-07T12:42:38.130Z
Answers.LastActivityDate: 2017-07-07T12:42:38.130Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>Does anybody know if it's possible to load matrixBlock and eager load the entries (=owner) the matrixBlocks belong to in Craft 3?</p>
  
  <p>I tried:</p>
  
  <pre><code>{% set blocks = craft.matrixBlocks.type('eventDate').fieldId(4).with('owner') %}
  </code></pre>
  
  <p>but this does not work. Leaving out the <code>.with('owner')</code> works perfectly and then access its owner by <code>block.owner.&lt;fieldname&gt;</code></p>
  
Tags: <craft3><eager-loading>
Title: Craft 3: query matrixBlocks and eager load its owner?
ThreadText: # Craft 3: query matrixBlocks and eager load its owner?
  
  (Asked by: username_0 on 2017-07-07)
  
  Does anybody know if it's possible to load matrixBlock and eager load the entries (=owner) the matrixBlocks belong to in Craft 3?
  
  I tried:
  
  ```
  {% set blocks = craft.matrixBlocks.type('eventDate').fieldId(4).with('owner') %}
  
  ```
  
  but this does not work. Leaving out the `.with('owner')` works perfectly and then access its owner by `block.owner.<fieldname>`
  
  **Tags:** craft3, eager-loading
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-07-07. Score: 3 | Accepted answer
  
  Currently no, but I suppose since Craft 3 added the `craft.matrixBlocks()` template function, it would make sense to make this possible.
  
  Just created a FR about this: <https://github.com/craftcms/cms/issues/1820>
  
  
  ---
  
  