aelvan/Similar-Craft

Doesn't work with eager loading

Closed this issue · 0 comments

Here's some code:

{% set tagAndCategoryIds = entry.tags.ids()|merge(entry.categories.ids()) %}
{% set similarEntries = craft.similar.find({ element: entry, context: tagAndCategoryIds, criteria: craft.entries.limit(12).with(['mainImage', 'categories']) }) %}

Unfortunately, the .with() parameter added to the criteria doesn't seem to have any effect; it doesn't reduce the number of queries whatsoever.