Follow-on from #1195718: Use "foreign keys" to create metadata properties.

This makes a nicer label for the forward relationship provided from entity Foo to entity Bar when foo_schema defines a foreign key to bar.

Example: if you have a uid field in your entity, then this makes the views relationship description say 'Associated user via the ENTITY's uid.'

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Status: Active » Needs review
FileSize
950 bytes

Here's a patch.

It sets the title too... then something *after* entity_views_data() has fired changes is back to the property name, ie 'uid' instead of 'user'. Will dig further if I have more time...

Chris Matthews’s picture

Issue summary: View changes

The 7 year old patch in #1 to entity.views.inc applied cleanly to the latest entity 7.x-1.x-dev, but still needs review.