I was trying to import a node reference field and I got everything set up correctly via Table Wizard and a relationship using the generated node_map table. In my table analysis, I set up the correct pointer for pulling in the necessary node id into my node reference field, but during the migration, the field wasn't being populated at all. I noticed that the node field doesn't appear to be being named correctly for some reason. The data should actually be going into $node->field_release[0]['nid'], but it's actually going into $node->field_release_nid. I used HOOK_migrate_destination_prepare_node to fill in the correct field:
$node->field_release[0]['nid'] = $node->field_release_nid;
I was thinking that this is something that should work easily out of the box and shouldn't require the use of the hook, but I could be wrong.
Comments
Comment #1
attheshow commentedI think this issue was fixed by your commits on April 6th. Thanks Mike.
Comment #2
frankcarey commented"Table Wizard and a relationship using the generated node_map table". I tried to do this with one of these tables and it gave me an error about no primary key for the table. I think i have an updated codebase, can you elaborate how you did this?
Comment #3
attheshow commentedFrank,
Please check out my comment#13 over at the TW issue #420002: Error - Could not analyze node_map table to see what I did to get it to work. Also, if you could speak up in that issue too and let Mike know that you're having the same issue, that couldn't hurt.
Comment #4
frankcarey commentedoh cool. are these created in tw automatically now? ..nm i'll check the tw queue