Migration of field_collection with migration_d2d In D7 to D7 migrations, when it comes to field_collections I know “ Your field collection migration should be run after the host entity migration. ”.

I have done my host entity migration via the migrate_d2d module.

For my field_collection I have written a custom module and added migrate_d2d class name (7f4f1882cNodecook_committee_vote) as a dependency.

Has this logic flowed?

I ask because my field_collection migration does not update the previously migrated cook_committee_vote nodes, rather it makes empty stubs for them!!!
The answer is: the logic is not flowed, it is correct.
when you write your own custom migration module you can establish dependencies to other migrations that you have done via code or done via UI using migrate_ui or d2d_migrate_ui modules. 
here is custom migration code that depends on a class generated by d2d_migrade_ui. this code worked for me:



$this-&gt;description = t('casey will migrate this field cllection even if it kills him!!!!!!'); 
// class of prviously imported node, this class name was generated by d2d_migrate module
// that is why the name is diffrent
$this-&gt;dependencies = array('7f4f1882cNodeorg_vote'); 

$query = $this-&gt;getConnection()
// start with the field that embeds the field_collection
-&gt;select('field_data_field_org_member_votes', 'nodeField')
-&gt;fields('nodeField', array('entity_id', 'field_org_member_votes_value', 'delta'))
-&gt;groupBy('nodeField.field_org_member_votes_value')
-&gt;orderBy('nodeField.entity_id')
-&gt;orderBy('nodeField.delta');

// join it to the fields that make up the field_collection, in my case there were 3 fields
$query-&gt;leftJoin('field_data_field_org_votes_member', 'member',
'nodeField.field_org_member_votes_value = member.entity_id');
$query-&gt;addField('member', 'field_org_votes_member_nid');

$query-&gt;leftJoin('field_data_field_org_votes_vote', 'vote',
'nodeField.field_org_member_votes_value = vote.entity_id');
$query-&gt;addField('vote', 'field_org_votes_vote_value');

$query-&gt;leftJoin('field_data_field_org_votes_majority', 'majority',
'nodeField.field_org_member_votes_value = majority.entity_id');
$query-&gt;addField('majority', 'field_org_votes_majority_value');


$this-&gt;source = new MigrateSourceSQL($query);

$this-&gt;destination = new MigrateDestinationFieldCollection(
    'field_org_member_votes',
    array('host_entity_type' =&gt; 'node')
);

$this-&gt;map = new MigrateSQLMap($this-&gt;machineName,
    array(
        'field_org_member_votes_value' =&gt; array( 
            'type' =&gt; 'int',
            'not null' =&gt; TRUE,
            'description' =&gt; 'Unique ID for each commitee vote',
            'alias' =&gt; 'nodeField',
    )
  ),
  MigrateDestinationFieldCollection::getKeySchema()
); //map END

$this-&gt;addFieldMapping('host_entity_id', 'entity_id') -&gt;sourceMigration('7f4f1882cNodeorg_committee_vote');

$this-&gt;addFieldMapping('field_org_votes_member', 'field_org_votes_member') -&gt;sourceMigration('7f4f1882cNodemember');
$this-&gt;addFieldMapping('field_org_votes_member:source_type') -&gt;defaultValue('nid');

$this-&gt;addFieldMapping('field_org_votes_vote', 'field_org_votes_vote');

$this-&gt;addFieldMapping('field_org_votes_majority', 'field_org_votes_majority'); 

}//construct END

 function prepareRow($row) {
   // this is a good wat to test and make sure 
   // A) you have connected to the db 
   // B) you are getting proper values from your query
   // drush_print_r($row);
 }//prepareRow END
 function complete($row) {
   // drush_print_r($row);
 }
 public function prependTextNotes($row) {
     return 'Imported notes: ' . $row;
 }//prependTextNotes   END

 }