Entering inner fields after attaching a field collection entity programmatically CONTEXT

Adding a node with its field-collection field and inner fields programmatically. Saving the node. Then trying to reach the inner fields - bam! - they are not in the array! 

MORE INFO

if I am adding the node manually (not by code) and then trying to get to the inner fields - they ARE there.

[Edit] - The same problem of undefined inner field happens if saving using VBO (Views Bulk Operations module). So, can it be that the structure is bad? However, I have built the collection field using the manual interface only, not by code.

CREATING A NODE WITH FIELD COLLECTION

$node = // Creating a node
$fc_item = entity_create('field_collection_item', array('field_name' =&gt; $field_machine_name));
$fc_item-&gt;{$field_machine_name}[$node-&gt;language][$index][$value_column_name] = $field_value;
$fc_item-&gt;setHostEntity('node', $node, $node-&gt;language);
$fc_item-&gt;save(TRUE);
$node = node_submit($node);
node_save($node);


TRYING TO GET INSIDE FIELD COLLECTION JUST MADE

$value = $node-&gt;field_coll_print_authors['und'][0];
print_r($value);


I get:

Array
(
    [value] =&gt; 278 // This is the field collection item id
    [revision_id] =&gt; 1533
)


However, what I would have expect, and what I actually DO HAVE when adding a node of the same type by hand is:

Array
( 
    [field_print_author_last_name] =&gt; Array 
    (
        [und] =&gt; Array 
        (
            [0] =&gt; Array 
            (
                [value] =&gt; amir // This is the value I need
            ) 
        ) 
    )


HELP

Well, is there any function I have not called in order to attach the field collection item properly to the node? Or something else is missing? 

Thanks for your help!
Field collections are not stored in full with the Loaded node access via node_load(); only their entity ID.

The data does sometimes look like that, for example in a node form (because it actually has to create fields for them) and in a rendered node via node_view()(depending how you have set it in the view mode settings).

But you can load them easy enough and get the values that way.

Here is an example :

Dynamically creating a node with multiple field collections :

  global $user;
  $type = 'floor_staff_checklist';
  $event_id        = 12345;

  $chk_node        = new stdClass();
  $chk_node-&gt;type  = $type;
  $chk_node-&gt;title = '';
  node_object_prepare($chk_node);
  $chk_node-&gt;uid                           = $user-&gt;uid;
  $chk_node-&gt;nid                           = 0;
  $chk_node-&gt;status                        = 1;
  $chk_node-&gt;promote                       = 0;
  $chk_node-&gt;field_event[LANGUAGE_NONE][0] = array(
    'target_id'   =&gt; $event_id,
    'target_type' =&gt; 'node',
  );

  if ($type == 'floor_staff_checklist') {
    $time = strtotime("01-01-2000 19:30:00");
    for ($i = 0; $i &lt; 22; $i++) {
      $strtime = date("H:i", $time);
      $time += 1800;
      $flrchhk_fc = entity_create('field_collection_item', array('field_name' =&gt; 'field_floor_check'));
      $flrchhk_fc-&gt;setHostEntity('node', $chk_node);
      $flrchhk_fc-&gt;field_check_time[LANGUAGE_NONE][0]['value'] = $strtime;
      $flrchhk_fc-&gt;save();
    }
  }

  $chk_node = node_submit($chk_node);
  node_save($chk_node);
  drupal_goto("node/$chk_node-&gt;nid");
}


In this situation, I am creating a node, and creating 24 field collections within it, one for every hour, then saving the node.

And if you want to view the data :

$entity = entity_load_single($chk_node-&gt;nid);
if (isset($entity-&gt;field_floor_check[LANGUAGE_NONE]) &amp;&amp; !empty($entity-&gt;field_floor_check[LANGUAGE_NONE])) {
  $fcs = array_column($entity-&gt;field_floor_check[LANGUAGE_NONE], 'value');
  $items = entity_load('field_collection_item', $fcs);
  foreach ($items as $item) {
    dpm($item);
  }
}


This will load the node, access its references to the field collections, load them, and loop through them printing the contents through Krumo (Devel module).