How to save term with term references programmatically?
If you're using the built-in term reference field type, the column is named tid, e.g.:

$term-&gt;field_realization[$term-&gt;language][]['tid'] = $another_term-&gt;tid;


If you're using an Entity Reference field type, the column is named target_id, e.g.:

$term-&gt;field_realization[$term-&gt;language][]['target_id'] = $another_term-&gt;tid;