Answers.Body: <p>The reason this happens is Craft has a default limit of 100 for all ElementCriteriaModel objects (this includes assets, categories, entries, tags, and users, <a href="https://craftcms.com/docs/templating/elementcriteriamodel#creating-an-elementCriteriaModel" rel="nofollow noreferrer">also relations</a> as you encountered). </p>
  
  <p>This isn't made terribly clear in the documentation, but you can see it under <a href="https://craftcms.com/classreference/models/ElementCriteriaModel#defineAttributes-detail" rel="nofollow noreferrer">the defineAttributes() method on the ElementCriteriaModel class reference page</a>.</p>
  
  <p>As you discovered, adding a <code>.limit(null)</code> parameter overrides that limit.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-25T18:21:43.487Z
Answers.LastActivityDate: 2018-02-25T18:39:46.803Z
Answers.LastEditDate: 2018-02-25T18:39:46.803Z
Answers.UserDisplayName: Sapphireblue
Body: <p>Despite using null and paginate false i can still only return 100 queries with this:</p>
  
  <pre><code>{% set results = craft.entries({
      limit: null,
      paginate: false,
      section: 'directory',
      relatedTo: relationParam
  }) %}
  </code></pre>
  
  <p>How do I get all of them?</p>
  
  <p><strong>* UPDATE *</strong></p>
  
  <p>Well I found the problem and solution which is a bit strange - makes no sense to me.
  I am passing relatedTo a merged string 'relationParam' which has the mulitpple categories I want to search for. Once I set the limits on the categories that are related to the entries -see below - it all works.</p>
  
  <pre><code>{% set c = craft.categories.group('locations').slug(countrySlug).limit(null) %}
  {% set p = craft.categories.group('locations').slug(portSlug).limit(null) %}
  </code></pre>
  
  <p>So what doesn't make sense to me is that I am having to set the limit outside of the main entries query. I would have thought the entry limit specification would do this  not on the categories related.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-11T18:32:12.127Z
Comments.Text: There isn't a `paginate` parameter, so you can safely remove that. Maybe you just happen to have exactly 100 related entries?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-12T08:28:13.110Z
Comments.Text: Nah I am expecting 410. I am outputting a count on screen of the results array and its always 100
Comments.UserDisplayName: joomkit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-13T11:04:53.033Z
Comments.Text: What happens if you set the limit parameter to 410? How do you know that there should be 410 entries?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-14T10:07:21.580Z
Comments.Text: If I set the limit to 500 I still get just a 100 records returned. If I take out the 'relatedTo' params ( my search query) then I get my 410 records.
  It seems that relatedTo params is enforcing a limit
Comments.UserDisplayName: joomkit
Tags: <limit><query>
Title: Only allowed 100 queries with relatedto?
ThreadText: # Only allowed 100 queries with relatedto?
  
  (Asked by: username_0 on 2016-11-11)
  
  Despite using null and paginate false i can still only return 100 queries with this:
  
  ```
  {% set results = craft.entries({
      limit: null,
      paginate: false,
      section: 'directory',
      relatedTo: relationParam
  }) %}
  
  ```
  
  How do I get all of them?
  
  **\* UPDATE \***
  
  Well I found the problem and solution which is a bit strange - makes no sense to me.
  I am passing relatedTo a merged string 'relationParam' which has the mulitpple categories I want to search for. Once I set the limits on the categories that are related to the entries -see below - it all works.
  
  ```
  {% set c = craft.categories.group('locations').slug(countrySlug).limit(null) %}
  {% set p = craft.categories.group('locations').slug(portSlug).limit(null) %}
  
  ```
  
  So what doesn't make sense to me is that I am having to set the limit outside of the main entries query. I would have thought the entry limit specification would do this not on the categories related.
  
  **Tags:** limit, query
  
  > **Comments:**
  > **username_1**: There isn't a `paginate` parameter, so you can safely remove that. Maybe you just happen to have exactly 100 related entries?  
  > **username_0**: Nah I am expecting 410. I am outputting a count on screen of the results array and its always 100  
  > **username_2**: What happens if you set the limit parameter to 410? How do you know that there should be 410 entries?  
  > **username_0**: If I set the limit to 500 I still get just a 100 records returned. If I take out the 'relatedTo' params ( my search query) then I get my 410 records. It seems that relatedTo params is enforcing a limit  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-02-25. Score: 1 | Accepted answer
  
  The reason this happens is Craft has a default limit of 100 for all ElementCriteriaModel objects (this includes assets, categories, entries, tags, and users, [also relations](https://craftcms.com/docs/templating/elementcriteriamodel#creating-an-elementCriteriaModel) as you encountered).
  
  This isn't made terribly clear in the documentation, but you can see it under [the defineAttributes() method on the ElementCriteriaModel class reference page](https://craftcms.com/classreference/models/ElementCriteriaModel#defineAttributes-detail).
  
  As you discovered, adding a `.limit(null)` parameter overrides that limit.
  
  
  ---
  
  