How should I structure a node migration that has three locations? I have a situation where I need to migrate a D6 node that has three location fields.  The example code shown in the drupal module documentation (  https://drupal.org/node/2018113  ) isn't working.  I either get no addresses or four copies of the node.
I used the following code to join to the location tables for each lid field in the d6 content.  Whee!

$address_arguments = array(
        'administrative_area' =&gt; array('source_field' =&gt; 'hq_province'),
        'locality' =&gt; array('source_field' =&gt; 'hq_city'),
        'thoroughfare' =&gt; array('source_field' =&gt; 'hq_street'),
        'premise' =&gt; array('source_field' =&gt; 'hq_additional'),
        'postal_code' =&gt; array('source_field' =&gt; 'hq_postal_code'),
);
$this-&gt;addFieldMapping('field_company_address','hq_country')
-&gt;arguments($address_arguments);


$address_arguments = array(
        'administrative_area' =&gt; array('source_field' =&gt; 'leg_province'),
        'locality' =&gt; array('source_field' =&gt; 'leg_city'),
        'thoroughfare' =&gt; array('source_field' =&gt; 'leg_street'),
        'premise' =&gt; array('source_field' =&gt; 'leg_additional'),
        'postal_code' =&gt; array('source_field' =&gt; 'leg_postal_code'),
);
$this-&gt;addFieldMapping('field_company_legal_contact','leg_country')
-&gt;arguments($address_arguments);

$address_arguments = array(
        'administrative_area' =&gt; array('source_field' =&gt; 'inc_province'),
        'locality' =&gt; array('source_field' =&gt; 'inc_city'),
        'thoroughfare' =&gt; array('source_field' =&gt; 'inc_street'),
        'premise' =&gt; array('source_field' =&gt; 'inc_additional'),
        'postal_code' =&gt; array('source_field' =&gt; 'inc_postal_code'),
);
$this-&gt;addFieldMapping('field_company_inc_state','inc_country')
-&gt;arguments($address_arguments);


$this-&gt;addUnmigratedSources(array('field_company_twitter:title','field_company_twitter:attributes','field_company_linkedin:title','field_company_linkedin:attributes','field_website:title','field_website:attributes')); 

}
protected function query() {
$query = parent::query();
$query-&gt;leftJoin('location_instance', 'hq_i', 'hq_i.lid = f.field_hqaddress_lid AND hq_i.vid = n.vid');
$query-&gt;leftJoin('location', 'hq_l', 'hq_l.lid = hq_i.lid');
$query-&gt;addField('hq_l','street','hq_street');
$query-&gt;addField('hq_l','additional', 'hq_additional');
$query-&gt;addField('hq_l','city', 'hq_city');
$query-&gt;addField('hq_l','province' ,'hq_province');
$query-&gt;addField('hq_l','postal_code', 'hq_postal_code');
$query-&gt;addField('hq_l','country' ,'hq_country');

$query-&gt;leftJoin('location_instance', 'leg_i', 'leg_i.lid = f.field_legal_contact_address_lid AND leg_i.vid = n.vid');
$query-&gt;leftJoin('location', 'leg_l', 'leg_l.lid = leg_i.lid');
$query-&gt;addField('leg_l','street','leg_street');
$query-&gt;addField('leg_l','additional', 'leg_additional');
$query-&gt;addField('leg_l','city', 'leg_city');
$query-&gt;addField('leg_l','province' ,'leg_province');
$query-&gt;addField('leg_l','postal_code', 'leg_postal_code');
$query-&gt;addField('leg_l','country' ,'leg_country');

$query-&gt;leftJoin('location_instance', 'inc_i', 'inc_i.lid = f.field_incorporation_state_lid AND inc_i.vid = n.vid');
$query-&gt;leftJoin('location', 'inc_l', 'inc_l.lid = inc_i.lid');
$query-&gt;addField('inc_l','street','inc_street');
$query-&gt;addField('inc_l','additional', 'inc_additional');
$query-&gt;addField('inc_l','city', 'inc_city');
$query-&gt;addField('inc_l','province' ,'inc_province');
$query-&gt;addField('inc_l','postal_code', 'inc_postal_code');
$query-&gt;addField('inc_l','country' ,'inc_country');

return $query;
}