Active
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2012 at 15:19 UTC
Updated:
16 Nov 2012 at 16:00 UTC
This relationship handler in Entity module lets you limit a relationship by bundle.
Eg, you can go from orders to line items (but only shipping).
Unfortunately the UI needs a bit of work for entities that don't use an entity as their bundles (as with taxonomy or profile2).
Comments
Comment #1
rszrama commentedI don't think it's reasonable for us to change this in the core of Commerce 1.x, because it would potentially break any View that's been customized already. I can see this working fine in a contrib if people use it on new sites. For Commerce 2.x, we may not even have an Entity API dependency b/c of all the work going on in the core Entity system, so I'm just going to close this for now.
Comment #2
joachim commentedThis would only be a change in hook_view_data(), not in any default views. Furthermore, the new handler would add some extra options, which if not set, would make it behave exactly like the current one.
Hence I don't think it would break anything -- uncustomized views will pick up the new handle. Customized views that still have this relationship will pick up the new handler. Both will behave the same way.
Comment #3
rszrama commentedCan you show me some example code, perhaps?