1

I cannot migrate entity reference fields Migrate . I am following the examples online i.e.

$this->addFieldMapping('my_reference_field','bla')->sourceMigration('BooksNode')->separator(',');

The idea is for a book lending data. I can lend several books to one person (not a user on my site, just a regular content type).

Not sure what I am missing but nothing gets mapped.

I should add that the primary key on my Books table (in MySQL) is a composite one consisting of two fields id and unique_id. Do I need to add that somehow to :

$this->addFieldMapping('my_reference_field','bla')->sourceMigration('BooksNode')->separator(',');

maybe

$this->addFieldMapping('my_reference_field',array('id', 'unique_id'))->sourceMigration('BooksNode')->separator(',');

thx in advance

1
  • Is anything being written in the Messages area for your migration?
    – UltraBob
    Dec 11, 2015 at 4:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.