Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Although this module removes the Views dependency on SQL, it still assumes that the data store is local. This is problematic when attempting to display remote entities (using the Remote Entity API) through Views.
Here are some of the issues I've run into while putting this solution together for a client:
- Multiple Web service calls are made (one to get the entity IDs and one to fully load them) when only one is necessary.
- EntityFieldQuery objects are always used for query building. At present, RemoteEntityQuery objects (necessary to query for remote data through the Remote Entity API) are not supported.
I'll post a patch shortly.
Comment | File | Size | Author |
---|---|---|---|
#1 | add_remote_entity_support-2283083-1.patch | 4 KB | colan |
Comments
Comment #1
colanThis patch assumes the existence of RemoteEntityQuery::buildFromEFQ(), to convert an EFQ, which should be implemented in the RemoteEntityQuery subclass specific to the implementation.
I'll create a documentation issue in the Remote Entity API queue explaining how it should work, and then I'll relate it to this ticket.
Comment #3
colanComment #5
MurzThanks for the patch, but can you provide some example how to work with this, or maybe example module?
I create new entity type "mycustomentitytype" and new view for this entity type, but it shows me the error:
Entity mycustomentitytype has no base table.
This entity uses remote storage (via REST api), so no local drupal table used.
Same problem is when I try to use direct code:
Comment #6
colan@Murz: Please don't hijack closed bugs/features with support requests. Instead, open a Support Request ticket.
The blog post Integrating remote data into Drupal 7 and exposing it to Views may help you.