Problem/Motivation

The default views backend is highly coupled to relational databases, for example see node_views_data() having to re-specify entity schema.

In Drupal 7, there was a contrib module for an EFQ views backend - i.e. use Views to generate entity queries: https://www.drupal.org/project/efq_views

Entity queries are much more powerful in Drupal 10, for example we allow joins and aggregate queries.

If we ever want to add non-relational database storage to core, then an entity query views backend would allow this, whether it's for JSON storage in relational dbs, or in MongoDB etc.

Steps to reproduce

Proposed resolution

Add an entity query views backend.

Remaining tasks

Entity query can't do everything, for example history_views_data() wouldn't be accessible to entity query because that's an arbitrary database table, not entity data.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

dqd’s picture

As always, @catch crosses my way sooner or later with the same thought. :)

For years I was after the question how it would be best formulated as an issue to solve this ^^ for upcoming expectations on Views with the more and more growing flexibility of Drupal and custom entities, configs, etc. And here it is. :)

Thanks to @chx for pointing me to this issue here in a Slack conversation, where I have spontanously posted an (for me) old issue with Views limitations.

For now it is an FR explaining what is not working and what we want to achieve and how to solve this.

Add an entity query views backend.

What are the next steps for this to get some momentum?

catch’s picture

mxh’s picture

For remaining tasks:
Maybe we then also need an alternative mechanic for media_library since it's build on top of a view configuration.
Maybe any Drupal core module that ships with something on top of a Views config?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.