Answers.Body: <p>Assuming this is an Entries field in a Matrix block, the syntax is:</p>
  <pre class="lang-twig prettyprint-override"><code>{% set ideas = craft.entries()
      .section('ideas')
      .status('live')
      .with([
          ['matrixField.blockType:entriesField', { status: ['not', 'live'] }]
      ])
      .all() %}
  </code></pre>
  <p>Change <code>matrixField.blockType:entriesField</code> to match your fields, of course :)</p>
  <p>Documentation is here - <a href="https://craftcms.com/docs/3.x/dev/eager-loading-elements.html#eager-loading-elements-related-to-matrix-blocks" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/dev/eager-loading-elements.html#eager-loading-elements-related-to-matrix-blocks</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-23T08:38:44.367Z
Answers.Text: Thanks @Oli, it's a SuperTable but I managed to find what I needed from the link you provided and its now working: https://craftcms.com/docs/3.x/dev/eager-loading-elements.html#defining-custom-parameters-on-eager-loaded-elements
Answers.UserDisplayName: Sean Delaney
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-22T19:19:53.090Z
Answers.LastActivityDate: 2022-02-22T19:19:53.090Z
Answers.UserDisplayName: Oli
Body: <p>By default eager loading only returns live entries. Is it possible to grab expired only.</p>
  <p>I've got this... But I only want expired <code>relatedVenue</code>:</p>
  <pre><code>{% set ideas = craft.entries().section('ideas').with(['stListicles', 'stListicles.relatedVenue']) %}
  </code></pre>
  <p>Possible?</p>
  <p>I've already tried this:</p>
  <pre><code>{% set ideas = craft.entries().section('ideas').status('live').with([
      'stListicles',
      ['stListicles.relatedVenue', { status: 'expired, disabled, pending' }]
  ]) %}
  </code></pre>
  
Tags: <eager-loading><status>
Title: Eager load expired entries
ThreadText: # Eager load expired entries
  
  (Asked by: username_0 on 2022-02-22)
  
  By default eager loading only returns live entries. Is it possible to grab expired only.
  
  I've got this... But I only want expired `relatedVenue`:
  
  ```
  {% set ideas = craft.entries().section('ideas').with(['stListicles', 'stListicles.relatedVenue']) %}
  
  ```
  
  Possible?
  
  I've already tried this:
  
  ```
  {% set ideas = craft.entries().section('ideas').status('live').with([
      'stListicles',
      ['stListicles.relatedVenue', { status: 'expired, disabled, pending' }]
  ]) %}
  
  ```
  
  **Tags:** eager-loading, status
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-02-22. Score: 1 | Accepted answer
  
  Assuming this is an Entries field in a Matrix block, the syntax is:
  
  ```twig
  {% set ideas = craft.entries()
      .section('ideas')
      .status('live')
      .with([
          ['matrixField.blockType:entriesField', { status: ['not', 'live'] }]
      ])
      .all() %}
  
  ```
  
  Change `matrixField.blockType:entriesField` to match your fields, of course :)
  
  Documentation is here - <https://craftcms.com/docs/3.x/dev/eager-loading-elements.html#eager-loading-elements-related-to-matrix-blocks>
  
  > **Comments:**
  > **username_0**: Thanks @username_1, it's a SuperTable but I managed to find what I needed from the link you provided and its now working: https://craftcms.com/docs/3.x/dev/eager-loading-elements.html#defining-custom-parameters-on-eager-loaded-elements  
  
  ---
  
  