Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By marksward on
Trying to get my head around how to add and remove entity references.
I have node A which has an entity reference field to another content type.
I am programmatically creating A nodes and need to first remove existing references and then recreate them (more than one node can be referenced 'unlimited').
I've been reading documentation, but still none the wiser on how to do this