Hello! I'm having an issue trying to query for entries by a related entry's contentType.
I have 3 models - Resource, BlogPost and Video
I'm trying to query this model:
Resource
which has the single-reference field:
RESOURCE:
entry => BlogPost or Video
My query using the gem looks like this:
Content::Resource.all('fields.entry.sys.contentType.sys.id': 'blogPost', include: 4)
(the internal implementation of this should be fine, as include: 4 is passed correctly as an option along with the field query in the logs)
I get no errors.
What I get back is:
100 Resource entries, containing a mix of BlogPost and Video entries linked to the entry field
What i want is:
Only Resource entries with BlogPosts linked to the entry field
Any clue where the issue is? Thank you!
Hello! I'm having an issue trying to query for entries by a related entry's contentType.
I have 3 models -
Resource,BlogPostandVideoI'm trying to query this model:
Resourcewhich has the single-reference field:
RESOURCE:
entry=>BlogPostorVideoMy query using the gem looks like this:
Content::Resource.all('fields.entry.sys.contentType.sys.id': 'blogPost', include: 4)(the internal implementation of this should be fine, as
include: 4is passed correctly as an option along with the field query in the logs)I get no errors.
What I get back is:
100
Resourceentries, containing a mix ofBlogPostandVideoentries linked to theentryfieldWhat i want is:
Only
Resourceentries withBlogPosts linked to theentryfieldAny clue where the issue is? Thank you!