Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

In the entity I am constructing, using Entity API, I have a property that acts like a reference to another Entity to be defined upon construction time. (It is not known beforehand so I cannot use 'node' as my property type.)

Thing is, using this method, I cannot get a reference to that entity in views (for example). Other properties that link to entities but have well defined types work perfectly.

What is the correct way to have references (field/relationship) to an entity described in a property?

In the API documentation it states: "entity: A special type to be used generically for entities where the entity type is not known beforehand. The entity has to be represented using an EntityMetadataWrapper."

How/where to use EntityMetadataWrapper to get a reference to the entity? Forgot to mention that I have it's type stored.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.