Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2011 at 15:22 UTC
Updated:
24 Sep 2011 at 10:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerCan you provide a use case where you want to attach something to a table which is not a base table?
Comment #2
dawehnerIt's currently hard to guess one, sorry.
Comment #3
drunken monkeyIn #1266036: Add generic Views entity tables with fields and relationships we want to provide Views tables (but not base tables, since there is no query class (+ other reasons)) for all entity types, to be, e.g., used in relationships (by the Search API for instance).
For getting support for things like #1270890: provide a way to provide entity-related views fields, it would still be nice to be able to define an entity type for them.
(Incidentally, it would be great to get your feedback on the first mentioned issue – whether this makes sense in your opinion, and maybe provide help if we get stuck. We aren't a 100% sure about the relationships, for example – a quick review once we have something working would probably help a lot.)
Comment #4
dawehnerThere shouldn't be a problem with moving up this key to the $data['name']['table']['entity key'] level.
I guess all people knowing about this information are already active on this issue, so there shouldn't break too much things.
Comment #5
dawehnerHere is a patch which moves the existing data + the code in query_default + writes something in the upgrade file.
Comment #6
drunken monkeyYou wrote "entity key" instead of "entity type" in some instances. Attached patch fixes this.
Other than that, the patch looks good.
Comment #7
dawehnerHehe got the documentation wrong :)
Comment #8
fagoUnrelated new line, else the patch looks good to me.
Comment #9
dawehnerThis bug existed because i thought, hey there is a file entity so just add it here, ugh, there is no base table here... forgot about it.
In reality the table data is in the system.views.inc so the file_managed table didn't had this integration yet.
Commited this patch with the change for the file entity.
Comment #10
drunken monkey@ fago: Please notify me when you adapt Entity API to this, either here or per mail, so Search API is as shortly as possible „incompatible“.