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.