Is there a way to select parents from multiple child entry ids? For example, I have a blog channel with a playa relationship,via a blog_staff field, to a people channel (to identify authors of blog entries) and a team channel with a playa relationship, via a team_members field, to people as well (to group them into teams). I tried to query for blog entries of multiple people but seem to be limited to only one.
I tried the playa field feeding the people entry_ids through an embed to a parents field to grab the associated blog entries:
{team_members}
{embed="includes/.bp_by_staff" entry_id="{entry_id}"}
{/team_members}
The .bp_by_staff template trying to use those people entry_ids to look up their blog posts:
{exp:playa:parents channel="blog" entry_id="{embed:people}"}
{title}
{/exp:playa:parents}
Now, if {embed:people} is just one entry_id, say "18", this works great, the blog posts get found. But if {embed:people} yields multiple entry ids (the team has more than one person), say "18|29", it doesn't work.
Looking through the profiler for the generated sql of the failing case, one can see why. It seems like including more than one entry_id breaks the sql query which uses "=" rather than " in " for the where clause:
SELECT DISTINCT(rel.parent_entry_id) AS entry_id
FROM exp2_playa_relationships rel
WHERE rel.child_entry_id = 18|29
If the where clause were using "in" as in WHERE rel.child_entry_id in (18, 29)
the query works correctly.
Anyone find a workaround for getting results for multiple entry_ids ?