Keystone.js filtering on related fields within own model
<p>I am working on filtering my subsection selection to display only subSections that are related to the current mainNavigationSection. Each of these subsections also has a mainNavigation section. For some reason the current implementation is not returning any results.</p>

<p>Here is my Page Model:</p>

<pre><code>Page.add({
  name: { type: String, required: true },
  mainNavigationSection: { type: Types.Relationship, ref: 'NavItem', refPath: 'key', many: true, index: true },
  subSection: { type: Types.Relationship, ref: 'SubSection', filters: { mainNavigationSection:':mainNavigationSection' }, many: true, index: true, note: 'lorem ipsum' },
  state: { type: Types.Select, options: 'draft, published, archived', default: 'draft', index: true },
  author: { type: Types.Relationship, ref: 'User', index: true }
}
</code></pre>

<p>Here is my subSectionModel:</p>

<pre><code>SubSection.add({
  name: { type: String, required: true, index: true },
  mainNavigationSection: { type: Types.Relationship, ref: 'NavItem', many: true, required: true, initial: true},
  showInFooterNav: { type: Boolean, default: false },
  defaultPage: { type: Types.Relationship, ref: 'Page' },
  description: { type: Types.Html, wysiwyg: true, height: 150, hint: 'optional description' }
});
</code></pre>