I want to create a view with Entity Reference widget where results would be based on User and Node bundles. However I do not see the option EntityFieldQuery: Multiple when creating new view. Am I missing something, or what am I doing wrong?
Thanks in advance.

Comments

kiphaas7’s picture

Was removed in this issue:
http://drupal.org/node/1564740

Not really sure why it was marked as dubious at best there, but the module maintainer(s) should be able to state why it was removed.

sketman’s picture

Thanks for information.
Too bad that such a great feature was removed. Any advices how to create a view that will list results based on two different tables, please?

chx’s picture

Entity reference does not support multiple entity types in the first place. It only stores the entity id, the entity type is a field setting. Similarly, we were unable to come up with a viable use case for a query which can yield users or nodes. What is your use case?

kiphaas7’s picture

My use case would be having birthday fields (either using the birthday module or a standard repeating date field) on the user entity and date fields (events) on nodes. A first step to show them in a calendar, preferably via views and the calendar module, would be to actually be able to query both date fields. That's where I envisioned efq_views...

But please correct me if I made an error/missed something in my thought process!

sketman’s picture

My use case is, that I have a "Video" node type that should belong (and therefore should reference) to either the Author (user entity) or to the Song (node). If I could reference both - users and nodes in one view, it would be an elegant solution.

kiphaas7’s picture

#5: Isn't it already possible in views to make a relationship between the node and the node author? If you chose the node entity as base table, then make a relationship with the node author, it should give you access to the author's properties.

sketman’s picture

#6: Thanks for your input.
Yes, I can create the relationship, however:

- If my base table is node I will and up with the list of nodes that pass the selection criteria. Relationship to node author brings me up more information about each node author.

- If my base table is user, I will get the list of users that pass the selection criteria. Relationship User: Content authored brings up all content that each user created.

So in both cases I get list of users OR nodes. However I need a list which begins with users followed by nodes, users and nodes in one list.

chx’s picture

No, you can't create a relationship, not with EFQ. I will ponder on this and probably restore multiple.

chx’s picture

Status: Active » Closed (won't fix)

I discussed with bojanz and we arrived to the point that this would be awfully complicated -- the other parts of the ecosystem requires an entity type and so rendering the results and so on would not work.

If you have such a need write custom code based on EntityFieldQuery. Sorry.

kiphaas7’s picture

Well, shucks. But thanks for responding :).

bsandor’s picture