i am stuck retrieving an entity reference fields the correct way. All i tried gave me an error or and empty array...
What you see here is my node object that holds the data (copied from the DSM output):
... (Object) stdClass vid (String, 2 characters ) 64 uid (String, 1 characters ) 8 type (String, 6 characters ) people field_people_publications (Array, 1 element) und (Array, 3 elements) 0 (Array, 1 element) target_id (String, 3 characters ) 839 1 (Array, 1 element) target_id (String, 3 characters ) 840 3 (Array, 1 element) target_id (String, 3 characters ) 841
Documentiontion on using entity reference fields programmatically seems very very rare. I have noch found much that helped me out.
Related to the DSM output above:
How do i retrieve the entity reference field 'field_people_publications' from the node-ID #64?
What are those 'target_id' about? Inside the HTML view these are checkboxes with 5 options available. This is quite confusing.
Can you give give me a helping hand? What i wanted to do is to modify these options to some other values and save them again.